diff options
author | Rashmi Yadav <rays.rashmi@gmail.com> | 2013-09-13 18:26:18 +0200 |
---|---|---|
committer | Rashmi Yadav <rays.rashmi@gmail.com> | 2013-09-13 18:26:18 +0200 |
commit | 6b935d2c15a004e2d6f527e7bd7684e0dad96386 (patch) | |
tree | 331e8a513d85925fcec10bfbba9042e73815ae56 /guides/source | |
parent | de5c931b2c2a831255de8b5144d3c0d8267901ee (diff) | |
download | rails-6b935d2c15a004e2d6f527e7bd7684e0dad96386.tar.gz rails-6b935d2c15a004e2d6f527e7bd7684e0dad96386.tar.bz2 rails-6b935d2c15a004e2d6f527e7bd7684e0dad96386.zip |
Updated with latest method [ci skip]
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/active_support_core_extensions.md | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md index e6b849e4c9..c072330842 100644 --- a/guides/source/active_support_core_extensions.md +++ b/guides/source/active_support_core_extensions.md @@ -96,12 +96,13 @@ INFO: The predicate for strings uses the Unicode-aware character class `[:space: WARNING: Note that numbers are not mentioned. In particular, 0 and 0.0 are **not** blank. -For example, this method from `ActionDispatch::Session::AbstractStore` uses `blank?` for checking whether a session key is present: +For example, this method from `ActionController::HttpAuthentication::Token::ControllerMethods` uses `blank?` for checking whether a token is present: ```ruby -def ensure_session_key! - if @key.blank? - raise ArgumentError, 'A key is required...' +def authenticate(controller, &login_procedure) + token, options = token_and_options(controller.request) + unless token.blank? + login_procedure.call(token, options) end end ``` |