Created
March 26, 2015 09:57
-
-
Save satomixx/e9ae501ef035ab08e4ca to your computer and use it in GitHub Desktop.
[Rails4.x] simple_formを使って、create(登録)とupdate(編集)で同じformを使う際の注意 ref: http://qiita.com/tsumekoara/items/b78d4ba9dbf6cfe93c4f
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Routing Error No route matches [PATCH] “/hoge" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= simple_form_for(@hoge, :url => hoges_path, :html => {:id => 'hoge_form', :multiport => true}) do |f| %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= simple_form_for(@hoge, :html => {:id => 'hoge_form', :multiport => true}) do |f| %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST /hoge(.:format) hoge#create | |
PATCH /hoge/:id(.:format) hoge#update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment