Cross Reference: application_controller.rb
xref
: /
ontohub
/
app
/
controllers
/
application_controller.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
application_controller.rb revision 150729e51595775aa4d363ec94cf9e1cf1053116
class
ApplicationController
<
ActionController
::
Base
protect_from_forgery
protected
helper_method
:
admin
?
def
admin
?
current_user.try
(:
admin
?)
end
def
authenticate_admin
!
unless
admin
?
flash
[:
error
] =
"you need admin privileges for this action"
redirect_to
:
root
end
end
end