Skip to content

Commit

Permalink
Use the Ruby 1.8 hash syntax.
Browse files Browse the repository at this point in the history
Yes we still support Ruby 1.8 😢

Conflicts:
	Gemfile.lock
  • Loading branch information
rafaelfranca committed Jan 28, 2013
1 parent 7dfbe6f commit d9513e3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
devise (2.1.2)
devise (2.1.3)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1)
railties (~> 3.1)
Expand Down Expand Up @@ -87,7 +87,7 @@ GEM
omniauth-openid (1.0.1)
omniauth (~> 1.0)
rack-openid (~> 1.3.1)
orm_adapter (0.1.0)
orm_adapter (0.4.0)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
Expand Down
2 changes: 1 addition & 1 deletion lib/devise/models/authenticatable.rb
Expand Up @@ -206,7 +206,7 @@ def http_authenticatable?(strategy)
# 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
Expand Down
6 changes: 3 additions & 3 deletions test/models/authenticatable_test.rb
Expand Up @@ -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

0 comments on commit d9513e3

Please sign in to comment.