Q:

How to pass a Ruby hash key and value to a Rails FormHelper function?

In the controller, I'd like to do:
@options = { :obj_id => @obj.id, :obj2_id => @obj2.id }

And in the view:
<%=
remote_form_for(:model_object, :url => { :action => 'some_action' }) do |f|
     @options.each { |k, v|
       f.hidden_field(k, { :value => v })
     }
}
%>

The code above currently will just output the string values of each key/value and not a hidden input field.
My experience tells me I'm missing something simple...  What am I missing?
Thanks for the help.

A:

You don't need to use send for this because hidden_field isn't a private method, nor is the method you're calling dynamic. These are the only two reasons you should be using send. 
Instead, make your form use more ERB tags:
<%= remote_form_for(:model_object, :url => { :action => 'some_action' }) do |f| %>
  <% @options.each do |k, v| %>
    <%= f.hidden_field(k, { :value => v }) %>
  <% end %>
<% end %>

