diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2013-04-02 12:24:21 -0700 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2013-04-02 12:24:21 -0700 |
commit | 4ae089b661a78180bb978a34d294e8a9e076f652 (patch) | |
tree | d646923ce6d6acf47a96805dd0f6580d1f8625a5 /actionpack | |
parent | defb5a2f5ab16a0ec5a791a998d5427ded7ac26c (diff) | |
parent | 04cda1848cb847c2bdad0bfc12160dc8d5547775 (diff) | |
download | rails-4ae089b661a78180bb978a34d294e8a9e076f652.tar.gz rails-4ae089b661a78180bb978a34d294e8a9e076f652.tar.bz2 rails-4ae089b661a78180bb978a34d294e8a9e076f652.zip |
Merge pull request #10054 from rubys/use_find_by_in_rdoc
Prefer find_by over dynamic finders in rdoc
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 bb701184e8..5ae8c6c3b0 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 c7bb2dd147..158d552ec7 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 @@ -345,7 +345,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 41b5228872..b9a5e78fe9 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -316,7 +316,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 # |