Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%= form_for(@user, url: 'create', html: {method: 'GET'}) do |f| %>
- <%= f.label :name %>
- <%= f.text_field :name %>
- <%= f.submit %>
- <% end %>
- ちなみにurl: 'hoge'と指定すると、
- コントローラ名#create
- に飛ばされる。
- form_forの性質上、転送先は同じコントローラ配下の別アクションであるとRailsは推測するから
Add Comment
Please, Sign In to add comment