2023-08-04から1日間の記事一覧
初めに application_controllerで以下のものを定義して、ログインしていないユーザーに対してアクセス制限をかけるようにした。 def authenticate_user if @current_user == nil flash[:notice] = "ログインが必要です" redirect_to("/login") end end 今回…
初めに application_controllerで以下のものを定義して、ログインしていないユーザーに対してアクセス制限をかけるようにした。 def authenticate_user if @current_user == nil flash[:notice] = "ログインが必要です" redirect_to("/login") end end 今回…