Class: BaseFormObject

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Attributes, ActiveModel::Model, ActiveModel::Validations::Callbacks, StripAttributes
Defined in:
app/forms/base_form_object.rb

Direct Known Subclasses

Image::Transform, Lead

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ BaseFormObject

Returns a new instance of BaseFormObject.



14
15
16
# File 'app/forms/base_form_object.rb', line 14

def initialize(attributes = {})
  super
end

Instance Method Details

#attributesObject

Return symbol-keyed hash for backward compatibility with code that does
attributes[:foo] or attributes.reject { |k, _| k.in?(%i[...]) }.



20
21
22
# File 'app/forms/base_form_object.rb', line 20

def attributes
  super.transform_keys(&:to_sym)
end

#persisted?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'app/forms/base_form_object.rb', line 10

def persisted?
  false
end