Skip to content

Instantly share code, notes, and snippets.

@kevin-shu
Created May 3, 2013 06:12
Show Gist options
  • Save kevin-shu/5507484 to your computer and use it in GitHub Desktop.
Save kevin-shu/5507484 to your computer and use it in GitHub Desktop.
Example
#controller這樣寫:
class ConsultantController << ApplicationController
# routing: post "consultant/create" => "consultant#create"
def create
Consultant.create params[:consultant]
end
end
#view這樣寫:
<form action="/consultant/create" method="post">
姓名:<input name="consultant[name]" />
<input type="submit"/>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment