8
10

More than 3 years have passed since last update.

Rails逆引きリファレンス

Last updated at Posted at 2020-12-22

機能要件

[Rails]機能要件の逆引きリファレンス

非機能要件

Model系

[Rails]Model系

View系

[Rails]View系

Controller系

[Rails]Controller系

URL,ルーティング系

[Rails]ルーティング系

DB,ActiveRecord系

[Rails]DB,ActiveRecord系

セキュリティ系

[Rails]セキュリティ系

デバッグ系

docker下のbinding.pryでのデバッグの方法
https://qiita.com/STHEXA/items/1de2411cb3987066c9b9
https://qiita.com/sukezane/items/c97b9e977d111794d810
https://qiita.com/hb5kz/items/7c9d266480079910de5c

エラー系

[Rails]エラーメッセージをブラウザ画面に表示したい
https://railstutorial.jp/chapters/basic_login?version=5.1#sec-rendering_with_a_flash_message
https://railstutorial.jp/chapters/sign_up?version=5.1#sec-signup_error_messages
https://railstutorial.jp/chapters/sign_up?version=5.1#sec-the_flash

タイミング系

[Rails]Emailアドレスをデータベースに保存する際に事前に小文字にしておきたい - コールバック
https://qiita.com/okamoto_ryo/items/458097542e826623b7ad
https://railstutorial.jp/chapters/account_activation?version=5.1#sec-activation_token_callback
コールバック。オブジェクトが生成(create)、更新(update)、破壊(delete)される時や、バリデーションを実行する時の前後に共通の処理を追加する仕組みのことを指す
before_save { self.email = email.downcase }
ブロックを渡してユーザーのメールアドレスを設定します
before_create :create_activation_digest
上のコードはメソッド参照と呼ばれるもので、こうするとRailsはcreate_activation_digestというメソッドを探し、ユーザーを作成する前に実行するようになります

認可、認証、権限関連

[Rails]認可、認証、権限関連

DRYに書きたい(可読性、保守性)

[Rails]DRYに書きたい(可読性、保守性)

その他
[Rails]rails sがバックグラウンドにあり、ctrl+cで消せない場合
https://qiita.com/kanuu/items/fd6e33fca6ad6a90d059

[Rails]ユニーク制約とは?どんなメリットがある?

[Rails]シンボルを使うタイミング
https://uxmilk.jp/25934

[Rails]attr_accessor とは?
http://bryankawa.hatenablog.com/entry/2017/01/28/150537

非同期で通信がしたい→Ajax,JS
https://railstutorial.jp/chapters/following_users?version=5.1#sec-a_working_follow_button_with_ajax

8
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
10