Module: AuthicClient::ApplicationHelper
- Defined in:
- app/helpers/authic_client/application_helper.rb
Instance Method Summary collapse
- #current_user ⇒ Object
- #login_required ⇒ Object
- #signin_iframe_path ⇒ Object
- #signin_path ⇒ Object
- #signup_path ⇒ Object
- #user_account_path ⇒ Object
Instance Method Details
#current_user ⇒ Object
4 5 6 |
# File 'app/helpers/authic_client/application_helper.rb', line 4 def current_user @current_user ||= ::User.find(session[:authic_user_id]) if session[:authic_user_id] end |
#login_required ⇒ Object
24 25 26 27 28 29 |
# File 'app/helpers/authic_client/application_helper.rb', line 24 def login_required unless current_user session[:authic_return_to_this_url] = request.fullpath redirect_to signin_path end end |
#signin_iframe_path ⇒ Object
16 17 18 |
# File 'app/helpers/authic_client/application_helper.rb', line 16 def signin_iframe_path "#{AuthicClient::AUTHIC_CLIENT_FULL_URL}/v1/signin_iframe" end |
#signin_path ⇒ Object
8 9 10 |
# File 'app/helpers/authic_client/application_helper.rb', line 8 def signin_path "/auth/authic?&authic_action=signin" end |
#signup_path ⇒ Object
12 13 14 |
# File 'app/helpers/authic_client/application_helper.rb', line 12 def signup_path "/auth/authic?&authic_action=signup" end |
#user_account_path ⇒ Object
20 21 22 |
# File 'app/helpers/authic_client/application_helper.rb', line 20 def user_account_path "#{AuthicClient::AUTHIC_CLIENT_FULL_URL}/edit_account" end |