Sha256: 3b42d808f0431d03b879d93d1d25019c8ef9a2c3d9bd437147405012f5c58e07
Contents?: true
Size: 567 Bytes
Versions: 1
Compression:
Stored size: 567 Bytes
Contents
module SimpleForum class ApplicationController < ::ApplicationController #::ActionController::Base protect_from_forgery layout SimpleForum.layout helper_method :authenticated_user, :user_authenticated? private def authenticated_user instance_eval &AbstractAuth.invoke(:authenticated_user) end def user_authenticated? instance_eval &AbstractAuth.invoke(:user_authenticated?) end def authenticate_user redirect_to :back, :alert => "You have to be logged in" unless user_authenticated? end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simple_forum-0.0.1 | app/controllers/simple_forum/application_controller.rb |