Skip to content

Instantly share code, notes, and snippets.

@matatabi
Created February 16, 2011 10:33
Show Gist options
  • Save matatabi/829160 to your computer and use it in GitHub Desktop.
Save matatabi/829160 to your computer and use it in GitHub Desktop.
examples for forms
Different ways in which you can use the form_for helper.
<%= form_for([:admin, @order], :html => {:multipart => true, :class => "std", :name=>'f' }) do |f| %>
<%= form_for(@order, :url=> somepath, :html => {:method => :put, :class => "std", :name=>'f' }) do |f| %>
<%= form_for("order[something]", :url=> somepath, :html => {:method => :put, :class => "std", :name=>'f' }) do |f| %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment