Skip to content

Instantly share code, notes, and snippets.

@x37v
Created October 15, 2010 18:39
Show Gist options
  • Save x37v/628702 to your computer and use it in GitHub Desktop.
Save x37v/628702 to your computer and use it in GitHub Desktop.
#in the form
<% if @opportunity.opportunity_filters.size > 0 %>
<% f.fields_for :opportunity_filters do |filter_form| %>
<%= render 'opportunity_filters/edit_form',
:locals => {:foo => @opportunity.opportunity_filters[0], :f => filter_form} %>
<% end %>
<% end %>
#the partial [just for testing, filter_type is an attribute of opportunity_filter]
BLAH <%= foo.filter_type %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment