I'm a little confused on how hidden form fields work in Rails, like for example I have two hidden fields in my form like so:
(for a polymorphic model for commenting)
<%= form_for [commentable, commentable.comments.build], :remote => 'true' do |form| %>
<%= hidden_field "resource", commentable.class.to_s.downcase %>
<%= hidden_field "resource_id", commentable.id %>
<%= form.text_area :body %>
<%= submit_tag 'Post comment' %>
<% end %>
But so this works fine and what not, but the params that I receive in my controller are like this:
"resource"=>"photos", "resource_id"=>{"174"=>""}
Why is my resource_id param a hash too?