Class: ContactForm::Form

Inherits:
Object
  • Object
show all
Extended by:
ActiveModel::Naming
Includes:
ActiveModel::Conversion, ActiveModel::Validations
Defined in:
app/models/contact_form/form.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Form

Returns a new instance of Form.



14
15
16
17
18
# File 'app/models/contact_form/form.rb', line 14

def initialize(attributes = {})
 	attributes.each do |name, value|
   	send("#{name}=", value)
 	end
end

Instance Attribute Details

#emailObject

Returns the value of attribute email.



8
9
10
# File 'app/models/contact_form/form.rb', line 8

def email
  @email
end

#messageObject

Returns the value of attribute message.



8
9
10
# File 'app/models/contact_form/form.rb', line 8

def message
  @message
end

#nameObject

Returns the value of attribute name.



8
9
10
# File 'app/models/contact_form/form.rb', line 8

def name
  @name
end

Instance Method Details

#persisted?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'app/models/contact_form/form.rb', line 20

def persisted?
 	false
end