エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
ここにツイート内容が記載されます https://b.hatena.ne.jp/URLはspanで囲んでください
Twitterで共有ONにすると、次回以降このダイアログを飛ばしてTwitterに遷移します
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
ApplicationController app/controllers/application_controller.rbにinclude Punditを追加します。 (... ApplicationController app/controllers/application_controller.rbにinclude Punditを追加します。 (この例ではcurrent_userが認可の対象のユーザです。) 認可に失敗するとrescue_fromのuser_not_authorizedメソッドでリダイレクトされます。 class ApplicationController < ActionController::Base include Pundit protect_from_forgery with: :exception helper_method :current_user before_action :authenticate rescue_from Pundit::NotAuthorizedError, with: :user_not_authori