lib/janus/models/confirmable.rb in janus-0.6.0 vs lib/janus/models/confirmable.rb in janus-0.7.0
- old
+ new
@@ -1,19 +1,22 @@
module Janus
module Models
# = Confirmable
- #
+ #
# Confirms an account's email by sending an email with an unique token.
# This is necessary to be sure the user can be contacted on that email.
- #
+ #
# IMPROVE: reconfirm whenever email changes.
module Confirmable
extend ActiveSupport::Concern
included do
- attr_protected :confirmation_token, :confirmation_sent_at, :confirmed_at
+ begin
+ attr_protected :confirmation_token, :confirmation_sent_at, :confirmed_at
+ rescue
+ end
janus_config(:confirmation_key)
-
+
before_create :generate_confirmation_token
# before_update :generate_confirmation_token, :if => :email_changed?
end
# Generates the confirmation token, but won't save the record.