You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
I'm using Simple Form here, but this is an issue with normal Rails forms, too. When using shallow routes, form_for needs different arguments depending in what context it's used. Example: For editing (http://localhost:3000/notes/2/edit), _form.html.erb needs to have simple_form_for(@note). But for creating a new note (http://localhost:3000/customers/2/notes/new) _form.html.erb needs simple_form_for
FlexやRuby on Railsなどで使い方とかを自分が後でわかるようにメモしておくブログ。最近はFlex系に飽きてます。 RailsでWebアプリケーションを作成していると、当然ですが、フロント側の画面と管理用の画面の二種類ができてきます その際に、フロント側からは当然ですが、管理用の画面を見せたくないという場面が出てくるかと思います その場合、Apache等でIP制限をかけたりするなどの対策が考えられますが、Rails側で次のようにすることもできます 環境 Rails 3.1.1, Ruby 1.9.2 Rails.configurationとroutesを組み合わせた方法 アプリケーションは以下のようになっているとします app/controllers ├── admin │ └── books_controller.rb ├── application_controller
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く