gon icon indicating copy to clipboard operation
gon copied to clipboard

How do you assign variables to gon in a view

Open cmendla opened this issue 8 years ago • 1 comments

I need to be able to assign/change gon variables in a view. I did find something about how to do that but couldn't find it again.

I tried

<%= @gon.namespace = {
        :vartest => "1234"
      }
%>

but that gave me an error of

NoMethodError in SlitterBedsheets#show

My goal is to assign a global variable from a view.

thanks

cmendla avatar Mar 06 '17 20:03 cmendla

If I remember correctly, you can use global variables for this. For example, Gon.global.variable = '1234'.

p12y avatar Mar 19 '17 02:03 p12y