class Security::CSRFTokenValidation
Constants
- MSG
Public Instance Methods
found_match(method)
click to toggle source
# File lib/simplycop/security/csrf_token_validation.rb, line 14 def found_match(method) [:verify_authenticity_token, 'verify_authenticity_token'].include?(method) end
on_send(node)
click to toggle source
# File lib/simplycop/security/csrf_token_validation.rb, line 6 def on_send(node) return unless skip_before_action(node) _, _, parts = *node method = parts.node_parts add_offense(node, location: :selector) if found_match(method[0]) end