Class: Lead

Inherits:
ActiveResource::Base
  • Object
show all
Defined in:
app/models/lead.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#passwordObject

Returns the value of attribute password.



7
8
9
# File 'app/models/lead.rb', line 7

def password
  @password
end

#password_confirmationObject

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

#validateObject



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