Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #application.rb
- class PermissionDenied < Exception
- #no implementation
- end
- class ApplicationController < ActionController::Base
- # Let derived controllers specify their authorization policy
- include AuthenticatedSystem
- # WTF?!? Ruby barfs here because it doesn't know about the symbol "PermissionDenied" ?!?
- # Same thing happens if I move the class definition inside ApplicationController
- rescue_from PermissionDenied { |e| http_status_code(:forbidden, e) }
- end
Add Comment
Please, Sign In to add comment