I’m calling a partial like so:
render :partial => ‘space_line’, :locals => {:external_space => @new_space.external_space, :space => @new_space}
Within the partial I have the following text_area code:
text_area( :external_space, :space_comment, :style => “width:
100%”, :class => “rich_text_editor”)
I assumed the text_area helper would access the local
variable :external_space, but of course does not. Instead it looks for @external_space. If it doesn’t find one, it creates an empty text
area.
Can I somehow provide a local variable, or am I out of luck here?
I assumed the text_area helper would access the local
variable :external_space, but of course does not. Instead it looks for @external_space. If it doesn’t find one, it creates an empty text
area.
Can I somehow provide a local variable, or am I out of luck here?
either assign the local variable to an instance variable (yuck) or use
form for which allows you to bind fields to non-instance variables.