12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/vex/action_controller/whitelisted_actions.rb', line 12
def verify_whitelisted_actions
return if self.class.name.starts_with?("Clearance::")
valid_actions = self.class.whitelisted_actions
return if valid_actions == :skip || valid_actions.include?(action_name)
unless Rails.env.development?
error 404, "This page doesn't exist"
return
end
msg = <<-TEXT
No such action exists: #{controller_name}##{action_name}.
Note: this application uses the whitelisted_actions plugin,
you might have to use the 'actions' method to whitelist your actions.
TEXT
logger.warn msg
error 404, msg
end
|