Sha256: 37b88f2ba6f3a95e2483784c9528e01c2a79d17b88908871ecdd44ba6b45aafe
Contents?: true
Size: 1.02 KB
Versions: 55
Compression:
Stored size: 1.02 KB
Contents
module ThinkFeelDoEngine # Brand logo navigation helper methods module BrandHelper # Uses the authorization state and contextual path to determine # the page branding link url. def brand_location if authorized_user_with_dashboard? || no_authorization_and_user_password_update_page? think_feel_do_dashboard.root_path elsif no_authorization_and_sign_in_page? "#" else main_app.root_url end end private def authorized_user_with_dashboard? defined?(think_feel_do_dashboard) && current_user end def no_authorization_and_sign_in_page? !current_user && !current_participant && (current_page?(Engine.routes.url_helpers.new_user_session_path) || current_page?(Engine.routes.url_helpers.new_participant_session_path)) end def no_authorization_and_user_password_update_page? !current_user && !current_participant && current_page?(Engine.routes.url_helpers.new_user_password_path) end end end
Version data entries
55 entries across 55 versions & 1 rubygems