I have created index.html.erb file and had ruby/html code in it and file is running on webrick server at localhost without using rails .
I have a Global JSON variable in my Ruby code. It looks like this :
@ruby_side_json = [{ :name => 'Will', :age => 23 },{ :name => 'John', :age => 30 }].to_json
I want this to be assigned to my javascript variable which resides in script
Not succeed by writing : var javascript_side_json = <%= @ruby_side_json %>
How can I achieve this?
javascript_side_json?