Module: Accounts

Defined in:
lib/accounts/model.rb,
lib/accounts.rb,
lib/accounts/helpers.rb,
lib/accounts/version.rb,
lib/accounts/configure.rb

Overview

Copyright Westside Consulting LLC, Ann Arbor, MI, USA, 2012

Defined Under Namespace

Modules: Gem, Helpers Classes: Account, AccountsError, ActionToken, Server

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.admin_emailObject

String



13
14
15
# File 'lib/accounts/configure.rb', line 13

def admin_email
  @admin_email
end

.changed_your_password_responseObject

String



8
9
10
# File 'lib/accounts/configure.rb', line 8

def changed_your_password_response
  @changed_your_password_response
end

.deliver_change_email_confirmationObject

Proc(old_email, new_email, link)



17
18
19
# File 'lib/accounts/configure.rb', line 17

def deliver_change_email_confirmation
  @deliver_change_email_confirmation
end

.deliver_change_email_notificationObject

Proc(old_email, new_email)



19
20
21
# File 'lib/accounts/configure.rb', line 19

def deliver_change_email_notification
  @deliver_change_email_notification
end

.deliver_change_password_confirmationObject

Proc(email)



16
17
18
# File 'lib/accounts/configure.rb', line 16

def deliver_change_password_confirmation
  @deliver_change_password_confirmation
end

Proc(email, link)



15
16
17
# File 'lib/accounts/configure.rb', line 15

def deliver_change_password_link
  @deliver_change_password_link
end

.deliver_new_account_admin_notificationObject

Proc(email)



18
19
20
# File 'lib/accounts/configure.rb', line 18

def 
  @deliver_new_account_admin_notification
end

.deliver_registration_confirmationObject

Proc(email, link)



14
15
16
# File 'lib/accounts/configure.rb', line 14

def deliver_registration_confirmation
  @deliver_registration_confirmation
end

.page_not_foundObject

String



5
6
7
# File 'lib/accounts/configure.rb', line 5

def page_not_found
  @page_not_found
end

.post_change_email_responseObject

String



12
13
14
# File 'lib/accounts/configure.rb', line 12

def post_change_email_response
  @post_change_email_response
end

.post_forgot_password_email_does_not_match_responseObject

Proc(email)



11
12
13
# File 'lib/accounts/configure.rb', line 11

def post_forgot_password_email_does_not_match_response
  @post_forgot_password_email_does_not_match_response
end

.post_forgot_password_responseObject

String



7
8
9
# File 'lib/accounts/configure.rb', line 7

def post_forgot_password_response
  @post_forgot_password_response
end

.post_register_already_registered_responseObject

Proc(email)



10
11
12
# File 'lib/accounts/configure.rb', line 10

def post_register_already_registered_response
  @post_register_already_registered_response
end

.post_register_new_account_responseObject

String



9
10
11
# File 'lib/accounts/configure.rb', line 9

def 
  @post_register_new_account_response
end

.redirect_after_logonObject

String



6
7
8
# File 'lib/accounts/configure.rb', line 6

def redirect_after_logon
  @redirect_after_logon
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Configure Accounts with your custom pages and e-mails.

Accounts.configure do |config|
  config.changed_your_password_response = "You have changed your password."
  config.redirect_after_logon = "/welcome"
end

See lib/accounts/configure.rb for complete example.

All config params that are strings may be replaced with Procs.

Yields:

  • (_self)

Yield Parameters:

  • _self (Accounts)

    the object that the method was called on



32
33
34
# File 'lib/accounts/configure.rb', line 32

def configure
  yield self
end