Module: CoreApplicationHelper

Defined in:
app/helpers/core_application_helper.rb

Overview

Helpers for the application itself

Instance Method Summary collapse

Instance Method Details

#current_memberMember

This method is abstract.

Return the current member

Returns - The current user that is logged in.

Returns:

  • (Member)
    • The current user that is logged in



15
16
17
# File 'app/helpers/core_application_helper.rb', line 15

def current_member
  @current_member
end

#current_userUser

This method is abstract.

Return the current user

Returns - The current user that is logged in.

Returns:

  • (User)
    • The current user that is logged in



9
10
11
# File 'app/helpers/core_application_helper.rb', line 9

def current_user
  @current_user
end

#referrer_url(default_url) ⇒ String

This method is abstract.

Return the referrer url without deleting it out of the session

Returns the session or the default_url if not found.

Parameters:

  • default_url (String)
    • The URL to use if the referrer session is not there

Returns:

  • (String)

    the session or the default_url if not found



22
23
24
# File 'app/helpers/core_application_helper.rb', line 22

def referrer_url(default_url)
  session[:referrer] || default_url
end