I wanna do something like this in rails
Here is what I have so far in rails:
<%= form_for @order do |f| %>
<%= f.hidden_field :service, "test" %>
<%= f.submit %>
<% end %>
But then I get this error:
undefined method `merge' for "test":String
How can I pass values in my hidden_field in rails?
You should do:
<%= f.hidden_field :service, :value => "test" %>
hidden_field
expects a hash as a second argument