Class: Lead
- Inherits:
-
ActiveResource::Base
- Object
- ActiveResource::Base
- Lead
- Defined in:
- app/models/lead.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
-
#password_confirmation ⇒ Object
Returns the value of attribute password_confirmation.
Instance Method Summary collapse
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
7 8 9 |
# File 'app/models/lead.rb', line 7 def password @password end |
#password_confirmation ⇒ Object
Returns the value of attribute password_confirmation.
7 8 9 |
# File 'app/models/lead.rb', line 7 def password_confirmation @password_confirmation end |
Instance Method Details
#validate ⇒ Object
9 10 11 12 13 |
# File 'app/models/lead.rb', line 9 def validate self.errors.add(:email, "Is required") if email.nil? self.errors.add(:password, "Is required") if password.nil? self.errors.add(:password_confirmation, "Must match password") if password != password_confirmation end |