Use the Ruby 1.8 hash syntax.

Yes we still support Ruby 1.8 😢

Conflicts:
	Gemfile.lock
This commit is contained in:
Rafael Mendonça França
2013-01-28 13:21:44 -02:00
parent bc82165ee3
commit 0430689b01
3 changed files with 5 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
PATH
remote: .
specs:
devise (2.0.4)
devise (2.0.5)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
railties (~> 3.1)

View File

@@ -155,7 +155,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

View File

@@ -2,8 +2,8 @@ require 'test_helper'
class AuthenticatableTest < ActiveSupport::TestCase
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