I’m using a partial to render both my new and edit views. How do I
indicate that I want specific fields to be display only on the edit
form?
Thanks for the help.
I’m using a partial to render both my new and edit views. How do I
indicate that I want specific fields to be display only on the edit
form?
Thanks for the help.
You might want to try something like
render :partial => ‘your_partial’, :locals => {:edit => true}
and then in the partial
<% if edit -%>
yeehaa, you might edit
<% end -%>
Cheers,
Jan
and to get the edit-bool the @controller variable might come in useful
@controller.action_name == ‘edit’
Cheers,
Jan
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs