vendredi 13 octobre 2017

Disable GET for Devise routes, Rails 5

I have Rails 5 with Devise with Ajax login/registration and I want to remove GET requests for these two actions. The default sign_in/sign_up routes are changed. This is my routes.rb:

devise_for :users, :path => '', :path_names => { :sign_in => "login", 
                       :sign_out => "logout", :sign_up => "registration" }, 
                       :controllers => {:sessions => 'sessions', 
                                        :registrations => 'registrations'

Aucun commentaire:

Enregistrer un commentaire