Hi, I use this:
<%= render :partial => 'shared/subscription' %>
To call this partial view:
<% form_for(:subscription, :url => city_subscriptions_path(@city)) do |form| %>
<%= form.hidden_field :city_id, :value => @city.id %>
<%= form.text_field :email, :size => 30 %>
<%= form.submit "Email Me" %>
<% end %>
Since I am using this partial view on different places, how do I alter the caller so it will pass a hash for the form_for
helper? So it would be like this when the helper is called:
<% form_for(:subscription, :url => city_subscriptions_path(@city), :html => {:id => 'main_input' }) do |form| %>
<%= form.hidden_field :city_id, :value => @city.id %>
<%= form.text_field :email, :size => 30 %>
<%= form.submit "Email Me" %>
<% end %>