Sha256: 86709308f35e86f7552ee7dab04fd54fca904ae1bdde856d0bbe9b42c173c8eb

Contents?: true

Size: 588 Bytes

Versions: 1

Compression:

Stored size: 588 Bytes

Contents

module SimpleForum
  class ApplicationController < ::ApplicationController #::ActionController::Base
    respond_to :html
    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.2 app/controllers/simple_forum/application_controller.rb