diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-01-18 05:06:42 -0800 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-01-18 05:06:42 -0800 |
commit | 637a7d9d357a0f3f725b0548282ca8c5e7d4af4a (patch) | |
tree | d0b3307df008377ba4b0449866d45c1a66556991 /actionpack | |
parent | 5937bd02dee112646469848d7fe8a8bfcef5b4c1 (diff) | |
parent | 7baecc48028e2d0cb57936ad10b9102ed129c9f9 (diff) | |
download | rails-637a7d9d357a0f3f725b0548282ca8c5e7d4af4a.tar.gz rails-637a7d9d357a0f3f725b0548282ca8c5e7d4af4a.tar.bz2 rails-637a7d9d357a0f3f725b0548282ca8c5e7d4af4a.zip |
Merge pull request #8989 from robertomiranda/use-rails-4-find-by
Replace deprecated find_by_* with find_by
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/abstract_controller/helpers.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/metal/http_authentication.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/abstract_controller/helpers.rb b/actionpack/lib/abstract_controller/helpers.rb index 812a35735f..93bb1d7189 100644 --- a/actionpack/lib/abstract_controller/helpers.rb +++ b/actionpack/lib/abstract_controller/helpers.rb @@ -29,7 +29,7 @@ module AbstractController # helper_method :current_user, :logged_in? # # def current_user - # @current_user ||= User.find_by_id(session[:user]) + # @current_user ||= User.find_by(id: session[:user]) # end # # def logged_in? diff --git a/actionpack/lib/action_controller/metal/http_authentication.rb b/actionpack/lib/action_controller/metal/http_authentication.rb index e295002b16..308b386d9a 100644 --- a/actionpack/lib/action_controller/metal/http_authentication.rb +++ b/actionpack/lib/action_controller/metal/http_authentication.rb @@ -29,7 +29,7 @@ module ActionController # # protected # def set_account - # @account = Account.find_by_url_name(request.subdomains.first) + # @account = Account.find_by(url_name: request.subdomains.first) # end # # def authenticate @@ -344,7 +344,7 @@ module ActionController # # protected # def set_account - # @account = Account.find_by_url_name(request.subdomains.first) + # @account = Account.find_by(url_name: request.subdomains.first) # end # # def authenticate diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index d8206b573d..9a41b27108 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -275,7 +275,7 @@ module ActionController # assert_response :found # # # Assert that the controller really put the book in the database. - # assert_not_nil Book.find_by_title("Love Hina") + # assert_not_nil Book.find_by(title: "Love Hina") # end # end # |