Method: Mints::BaseController#mints_contact_signed_in?

Defined in:
lib/mints/controllers/base_controller.rb

#mints_contact_signed_in?Boolean

Returns:

  • (Boolean)
[View source]

8
9
10
11
12
13
14
15
16
17
# File 'lib/mints/controllers/base_controller.rb', line 8

def mints_contact_signed_in?
    # Check status in mints
    response = @mints_contact.status
    status = response['success'] ? response['success'] : false
    unless status
      # if mints response is negative delete the session cookie
      cookies.delete(:mints_contact_session_token)
    end
    return status
end