Skip to content

Commit

Permalink
Use controller set on devise config as the base controller for the en…
Browse files Browse the repository at this point in the history
…gine
  • Loading branch information
00dav00 committed Aug 7, 2022
1 parent b81a763 commit ab9f448
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions app/controllers/graphql_devise/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# frozen_string_literal: true

module GraphqlDevise
ApplicationController = if Rails::VERSION::MAJOR >= 5
Class.new(ActionController::API)
else
Class.new(ActionController::Base)
class ApplicationController < Devise.parent_controller.constantize
end
end
2 changes: 1 addition & 1 deletion spec/dummy/app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
protect_from_forgery with: :null_session
end

0 comments on commit ab9f448

Please sign in to comment.