I\'m trying to save a variable called persistent_data.
persistent_data
I usually use session[:persistent_data] or cookies[:persistent_data], b
session[:persistent_data]
cookies[:persistent_data]
Localstorage has nothing to do with rails. You do it the same way as with any other language:
localStorage.getItem("company_id"); => 1
You can use rails to dynamically set the item however: