LoginSignup
0
0

More than 3 years have passed since last update.

Rails忘れがちな自分用メモ(主にprogate)

Last updated at Posted at 2020-04-18

基本、手書きでノートにメモしているので、検索用メモ
量が増えたら、細分化します。

params

params[:name]/params[:email]/params[:image]
入力された値を受け取るためのメソッドです。

postとgeet

post▷このデータあげます▷DBにデータを保存する時
get▷そのページください▷見たいページに飛ぶ時

authenticate_user

before_action :authenticate_user
 ↑全てのアクションに対して
before_action :authenticate_user, {only: [:index, :show, :edit, :update]}
 ↑onlyアクション限定

forbid_login_user

ログインユーザーが存在する場合、投稿一覧ページにリダイレクトするようにします。

ensure_correct_user

正しいユーザーかを確かめる

0
0
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
0
0