Skip to content

Instantly share code, notes, and snippets.

@1cg
Created January 5, 2012 05:40
Show Gist options
  • Save 1cg/1563884 to your computer and use it in GitHub Desktop.
Save 1cg/1563884 to your computer and use it in GitHub Desktop.
<%= form_for @article, :url => { :action => "create" }, :html => {:class => "nifty_form"} do |f| %>
<%= f.text_field :title %>
<%= f.text_area :body, :size => "60x12" %>
<%= f.submit "Create" %>
<% end %>
...
${formTag(ArticleController.create(article), :html = {"class" -> "nifty_form"} )}
${textField(article#Title)}
${textArea(article#Body, :size = "60x12")}
${submit("Create")}
</form>
...
<% using(formTag(ArticleController.create(article), :html = {"class" -> "nifty_form"} )) { %>
${textField(article#Title)}
${textArea(article#Body, :size = "60x12")}
${submit("Create")}
<% } %>
...
${form(ArticleController#create(article), :html = {"class" -> "nifty_form"} )}
${textField(article#Title)}
${textArea(article#Body, :size = "60x12")}
${submit("Create")}
${endForm}
...
${form( :for = ArticleController#create(article), :html = {"class" -> "nifty_form"} )}
${textField(article#Title)}
${textArea(article#Body, :size = "60x12")}
${submit("Create")}
${endForm}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment