2019-02-01から1ヶ月間の記事一覧
例えばログインしたユーザーのニックネーム等に不備があった場合まず編集画面にリダイレクトさせたいという処理 application_controller.rb class ApplicationController < ActionController::Base before_action :authenticate_user! before_action :invali…
これだとダメになってた class UsersController < ApplicationController def show render nothing: true end end 5.1だとどちらかで書けるようになっている class UsersController < ApplicationController def show render body: nil end end class UsersC…