Rails API is not well defined

You have to establish when your first hash of parameters ends,
otherwise form_tag will assume your :action, :id, and :class options
are a single hash, when :class really needs to go in a separate hash.

This might help explain a bit more:



Consider this:

<%=start_form_tag({ :action=> ‘quick_create’, :upload_id => @upid }, { :id => ‘quick_campaign_form’, :multipart => true})%>

You would put :class in the 2nd hash (eg. after :multipart). Otherwise, :class goes into the url_for method and I think is used as a param in the form post/get.


I had the same problem for a long time. I would study the helper
methods, but just couldnt get my head around it all. It seemed so
vague. But the penny has just about dropped. I think understanding
the Agile Rails chapters on form and field tags has helped. But just
getting used to dealing with database results as models and feeling
comfortable with the terminology took time. Now it starts to seem
obvious. I guess the problem is that some of the Rails 'Automagic'
can initially tend to be 'Automysteryerious' .