controllers
创建controller: rails g controller <controller name> <action name>
only
public
methods can be actions for controllers.
resources
要在routes中声明
form
用form_for的:url attribute改action
action for new form submisstion is "create"
controllers
创建controller: rails g controller <controller name> <action name>
only
public
methods can be actions for controllers.
resources
要在routes中声明
form
用form_for的:url attribute改action
action for new form submisstion is "create"