aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/http_authentication.rb
diff options
context:
space:
mode:
authorFrancesco Rodriguez <lrodriguezsanc@gmail.com>2012-12-07 14:46:06 -0500
committerFrancesco Rodriguez <lrodriguezsanc@gmail.com>2012-12-07 14:46:06 -0500
commita53a7bea8096a163876bb9961deb60f6c96b1493 (patch)
treea9b0a4ccd1b00acd8624dd2ab728e270da35b8c9 /actionpack/lib/action_controller/metal/http_authentication.rb
parentf53132deea65ae673b29b811c606be103f1ae3ab (diff)
downloadrails-a53a7bea8096a163876bb9961deb60f6c96b1493.tar.gz
rails-a53a7bea8096a163876bb9961deb60f6c96b1493.tar.bz2
rails-a53a7bea8096a163876bb9961deb60f6c96b1493.zip
update documentation and code to use _action callbacks
Diffstat (limited to 'actionpack/lib/action_controller/metal/http_authentication.rb')
-rw-r--r--actionpack/lib/action_controller/metal/http_authentication.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/metal/http_authentication.rb b/actionpack/lib/action_controller/metal/http_authentication.rb
index d3b5bafee1..283f6413ec 100644
--- a/actionpack/lib/action_controller/metal/http_authentication.rb
+++ b/actionpack/lib/action_controller/metal/http_authentication.rb
@@ -25,7 +25,7 @@ module ActionController
# the regular HTML interface is protected by a session approach:
#
# class ApplicationController < ActionController::Base
- # before_filter :set_account, :authenticate
+ # before_action :set_account, :authenticate
#
# protected
# def set_account
@@ -68,7 +68,7 @@ module ActionController
module ClassMethods
def http_basic_authenticate_with(options = {})
- before_filter(options.except(:name, :password, :realm)) do
+ before_action(options.except(:name, :password, :realm)) do
authenticate_or_request_with_http_basic(options[:realm] || "Application") do |name, password|
name == options[:name] && password == options[:password]
end
@@ -124,7 +124,7 @@ module ActionController
# USERS = {"dhh" => "secret", #plain text password
# "dap" => Digest::MD5.hexdigest(["dap",REALM,"secret"].join(":"))} #ha1 digest password
#
- # before_filter :authenticate, except: [:index]
+ # before_action :authenticate, except: [:index]
#
# def index
# render text: "Everyone can see me!"
@@ -317,7 +317,7 @@ module ActionController
# class PostsController < ApplicationController
# TOKEN = "secret"
#
- # before_filter :authenticate, except: [ :index ]
+ # before_action :authenticate, except: [ :index ]
#
# def index
# render text: "Everyone can see me!"
@@ -340,7 +340,7 @@ module ActionController
# the regular HTML interface is protected by a session approach:
#
# class ApplicationController < ActionController::Base
- # before_filter :set_account, :authenticate
+ # before_action :set_account, :authenticate
#
# protected
# def set_account