Skip to content

Commit

Permalink
Do not fail when putting the gem into the Gemfile before devise itself
Browse files Browse the repository at this point in the history
* Just load devise in the gem first to ensure correct load order
* Put gems in the "wrong" order in the tests to get them to fail
  when this fix is not applied.
  • Loading branch information
ujh authored and abevoelker committed Apr 28, 2024
1 parent 166f0ba commit a4b14c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/devise/passwordless.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require "devise"
require "devise/passwordless/version"
require "devise/monkeypatch"
require "devise/passwordless/rails" if defined?(Rails::Engine)
Expand Down
4 changes: 3 additions & 1 deletion spec/dummy_app_config/Gemfile.append
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ group :development, :test do
gem 'selenium-webdriver'
end

gem "devise"
# We put devise-passwordless first, to test that adding after_magic_link_sent_path_for
# to the controllers works in every order.
gem "devise-passwordless", :path => "../../../"
gem "devise"

0 comments on commit a4b14c4

Please sign in to comment.