lib/pinfirmable/models/pinfirmable.rb in pinfirmable-0.1.0 vs lib/pinfirmable/models/pinfirmable.rb in pinfirmable-0.1.1

- old
+ new

@@ -5,9 +5,13 @@ included do before_create :generate_confirmation_token after_commit :send_confirmation_instructions, on: :create end + def confirm + update_attribute(:pinfirmable_pin, nil) + end + protected def generate_confirmation_token pin = "" 6.times { pin << SecureRandom.random_number(9).to_s }