ruby on rails - Formtastic set class and id of form -


how can set class , id attribute form element through semantic_form_for?

the following code:

<% semantic_form_for (@meetingsearch), :class => "new_meeting_search", :id => "meeting_search" |f| %> 

gives me:

<form action="/meetingsearches" class="formtastic meetingsearch" id="new_meetingsearch" method="post">  

this should need (untested):

<% semantic_form_for @meetingsearch, :html => { :class => "new_meeting_search", :id => "meeting_search" } |f| %> 

for clarification, semantic_form_for wraps around rails' built in form_for, how in regular rails forms also:

<% form_for @meetingsearch, :html => { class => "new_meeting_search", :id => "meeting_search" } |f| %> 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -