Hi, here is my problem...

I use a custom form builders for my forms, so I have to use form_for
because form_tag does not work with form builders.

I have to implement a search engine, so I created a Search model (that
does not inherit from AR:B) with virtual accessors (q, category, etc).

Then I wrote a simple form with :

form_for @search, :builder => StandardBuilder, :method => :get do |f|
...

The problem is that Rails maps all the attributes in params[:search] and
the GET URL is not pretty at all :
/search?search[q]=sometext&search[category]=3&search[...]=...

Is there a way to create a form in Rails where the model attributes are
mapped in the root of the params hash ?

Or do you have another solution for this problem ?

Thanks.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to