I am a newbie in using Ruby. I am having issues with the form that I am going to use. I always get errors in using form_for tags. I am trying to create this sort of advanced search form: http://www.celiac.com/glutenfreemall...ced_search.php, I want to create the same form like the site shows. I am also having issues with using f.check_box or is it still applicable. Sorry for my mistakes in doing it, I am really a newbie in Ruby. Hoping for your responses.
If you want to make an advanced search form using Rails, then I recommend Sunspot/Solr.
Sunspot is a standalone Ruby library which integrates with the Solr search engine. It wraps the indexing and querying of the database in a declarative DSL, which you can use to expose virtually any Ruby object to be searched (not just ActiveRecord models). The sunspot gem also bundles a standalone version of the Solr search engine, which is great for your dev environment.
The trick with understanding those form helpers is that there are two versions.
form_for :blah binds a form to the :blah model and expects all fields to be attributes on the model.
A search form doesn't work that way ( you don't have a 'search' attribute on a model )
All the form helpers not using a model end with the word 'tag' e.g. form_tag, checkbox_tag etc. and will just create form tags and pass through values without expecting anything to do with a model.