jQueryが無効なRailsでDeviseのサインアウト(GETメソッド)を定義する
こんな感じ
config/routes.rb
Rails.application.routes.draw do
root 'page#index'
devise_for :users do
end
devise_scope :user do
get '/users/sign_out' => 'devise/sessions#destroy'
end
end
いつの間にかdevice_scopeというメソッドができていた。
- Method: ActionDispatch::Routing::Mapper#devise_for
devise_for :users, skip: :all
とやるとdevise_scope
で取捨選択して定義できる模様
Author And Source
この問題について(jQueryが無効なRailsでDeviseのサインアウト(GETメソッド)を定義する), 我々は、より多くの情報をここで見つけました https://qiita.com/tetsuyainfra/items/52a6b84b50c42fe0343b著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .