Class: ActionController::RequestForgeryProtection::ProtectionMethods::Exception

Inherits:
Object
  • Object
show all
Defined in:
lib/action_controller/metal/request_forgery_protection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(controller) ⇒ Exception

Returns a new instance of Exception.



246
247
248
# File 'lib/action_controller/metal/request_forgery_protection.rb', line 246

def initialize(controller)
  @controller = controller
end

Instance Attribute Details

#warning_messageObject

Returns the value of attribute warning_message.



244
245
246
# File 'lib/action_controller/metal/request_forgery_protection.rb', line 244

def warning_message
  @warning_message
end

Instance Method Details

#handle_unverified_requestObject



250
251
252
# File 'lib/action_controller/metal/request_forgery_protection.rb', line 250

def handle_unverified_request
  raise ActionController::InvalidAuthenticityToken, warning_message
end