Skip to content

Rails will get redefined when using devise-doorkeeper #43

Description

@bvogel

When using devise :doorkeeper in a model, the Rails module will be hidden by Doorkeeper::Rails and only accessible as ::Rails

I created a minimal project to highlight the issue; it is a minimal rails app with added devise-doorkeeper and minimal configurations for devise, doorkeeper and devise-doorkeeper. The only created test will highlight the error alternatively simply open a console and invoke User.new.rails_version:

Loading development environment (Rails 6.1.4.1)
3.0.2 :001 > User.new.rails_version
   (1.7ms)  SELECT sqlite_version(*)
/Users/username/Development/devise-doorkeeper-classloading-issue/app/models/user.rb:6:in `rails_version': undefined method `version' for Doorkeeper::Rails:Module (NoMethodError)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions