Use the Ruby 1.8 hash syntax.
Yes we still support Ruby 1.8 😢
This commit is contained in:
parent
d099d8f0ac
commit
bfa65dde70
|
@ -1,7 +1,7 @@
|
|||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
devise (2.2.2)
|
||||
devise (2.2.3)
|
||||
bcrypt-ruby (~> 3.0)
|
||||
orm_adapter (~> 0.1)
|
||||
railties (~> 3.1)
|
||||
|
|
|
@ -215,7 +215,7 @@ module Devise
|
|||
# Example:
|
||||
#
|
||||
# def self.find_for_authentication(tainted_conditions)
|
||||
# find_first_by_auth_conditions(tainted_conditions, active: true)
|
||||
# find_first_by_auth_conditions(tainted_conditions, :active => true)
|
||||
# end
|
||||
#
|
||||
# Finally, notice that Devise also queries for users in other scenarios
|
||||
|
|
|
@ -6,8 +6,8 @@ class AuthenticatableTest < ActiveSupport::TestCase
|
|||
end
|
||||
|
||||
test 'find_first_by_auth_conditions allows custom filtering parameters' do
|
||||
user = User.create!(email: "example@example.com", password: "123456")
|
||||
assert_equal User.find_first_by_auth_conditions({ email: "example@example.com" }), user
|
||||
assert_equal User.find_first_by_auth_conditions({ email: "example@example.com" }, id: user.id + 1), nil
|
||||
user = User.create!(:email => "example@example.com", :password => "123456")
|
||||
assert_equal User.find_first_by_auth_conditions({ :email => "example@example.com" }), user
|
||||
assert_equal User.find_first_by_auth_conditions({ :email => "example@example.com" }, :id => user.id + 1), nil
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue