Sha256: e7348e4fae1be9338d7fab486a33e1967d93e5d51a519c181c3c97814416071f
Contents?: true
Size: 932 Bytes
Versions: 96
Compression:
Stored size: 932 Bytes
Contents
module Phcmemberspro class ApplicationController < ActionController::Base # Filter and Security before_filter :require_user protect_from_forgery with: :exception # AuthRocket User Helpers def require_user unless current_user session[:last_url] = request.get? ? url_for(params) : url_for redirect_to new_login_url end end def current_user @_current_user ||= AuthRocket::Session.from_token(session[:ar_token]).try(:user) end helper_method :current_user def new_login_url ENV['AUTHROCKET_LOGIN_URL'] # $ar_login_url end helper_method :new_login_url # Add Helpers helper Phcnotifi::Engine.helpers helper Phctitleseo::Engine.helpers # Resolve Layouts for Gem def phcmemberspro_membersmain_layouts_resolver case action_name when "show" "layouts/phcmemberspro/members/members_profile" else "layouts/phcmemberspro/members/members_all" end end end end
Version data entries
96 entries across 96 versions & 1 rubygems