KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have the following line of haml: =form_tag :action => 'create', :controller => 'comments', :class => 'comment_form' do But the html that gets output is: <form accept-charset="UTF-8" action="/comments?class=comment_form" method="post"></form> I want to set the class. How do I do this? <-- Update --> With this: =form_tag ({ :action => 'create', :controller => 'comments' }, { :class => 'comment_form' }) do I get this error: syntax error, unexpected ',', expecting ')' ...', :controller => 'comments' }, { :class => 'comment_form' }... <-- Second Update --> The problem above is the space between 'form_tag' and '(' @woahdae's answer is correct
Tags (comma-separated)
Save Edits
Cancel