I have the following code in an rjs template that I should like to
move to a helper method associated with the controller:
if @read_access.value == “MemberEntityAccessibility”
page.insert_html :bottom, ‘read_access_list’,
:partial => ‘grantee’,
:collection => @read_grantees
I created a helper method called display_grantees and placed the above
code within it.
I then called the method from within the existing rjs template using
I get an error complaining of a nil object for @read_access (ie.
If I leave the code in the rjs template, it works fine. That is, I
know the instance variables @read_access etc are being initialised