examples/blog/app/controllers/application_controller.rb
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception.
For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception . For APIs you may want to use : null_session instead .
def authenticate
  	authenticate_or_request_with_http_basic do |user_name, password|
  		user_name == 'admin' && password == 'password'
  	end
  end
def authenticate authenticate_or_request_with_http_basic do | user_name , password | user_name == 'admin' && password == 'password' end end
Prevent CSRF attacks by raising an exception.
Prevent CSRF attacks by raising an exception .