-
-
Notifications
You must be signed in to change notification settings - Fork 467
Configuration
andhapp edited this page Sep 13, 2010
·
7 revisions
Clearance’s configuration lives in initializers/clearance.rb file. You can configure:
- mailer_sender i.e. address from where the e-mail goes out.
- cookie_expiration time in a block.
For example:
Clearance.configure do |config|
config.mailer_sender = 'me@example.com'
config.cookie_expiration = lambda { 2.weeks.from_now.utc }
end
The default value for cookie_expiration is 1 year. A session cookie can be created by passing nil inside the block.