ruby on rails 3 - How do I write a resource-less form with formtastic -


i'm having trouble creating following formtastic. it's simple form, it's not based on full resource, query string param i'd send.

# index.html.haml ... = form_tag resources_path, :method => 'get' |f|   = label_tag 'filter', 'filter'   = text_field_tag(:filter, params[:filter])   = submit_tag('go', :name => nil) 

formtastic overkill here, it'd nice use consistent semantics if possible.

how translate above formtastic syntax?

did see these railscasts:

http://railscasts.com/episodes/184-formtastic-part-1

http://railscasts.com/episodes/185-formtastic-part-2

https://github.com/justinfrench/formtastic/wiki/4-formtastic-options

should this:

= semantic_form_for @your_model |f|   = f.inputs   = f.buttons  

or this:

= semantic_form_for @your_model |f|   = f.input :filter   = f.commit_button :label => "go" 

then run rails g formtastic/stylesheets , add them stylesheets / asset pipeline. you'll need include these formtastic stylesheets in application layout.

please check railscasts above details


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -