Class: Golden::ApplicationForm

Inherits:
Object
  • Object
show all
Extended by:
ActiveModel::Callbacks
Includes:
ActiveModel::AttributeAssignment, ActiveModel::Conversion, ActiveModel::Validations, ActiveModel::Validations::Callbacks, BooleanAccessor, DateTimeAccessor, EnumAccessor, ExtendedAttrAccessor
Defined in:
lib/golden/objects/application/application_form.rb

Direct Known Subclasses

ActiveRecordForm, QueryForm

Constant Summary

Constants included from BooleanAccessor

BooleanAccessor::TRUE_VALUES

Class Method Summary collapse

Instance Method Summary collapse

Methods included from DateTimeAccessor

#parse_time

Methods included from ExtendedAttrAccessor

#attributes, #strip_attributes, #strip_attributes!

Constructor Details

#initialize(accessors = {}) ⇒ ApplicationForm

Returns a new instance of ApplicationForm.



33
34
35
# File 'lib/golden/objects/application/application_form.rb', line 33

def initialize(accessors = {})
  assign_attributes(strip_attributes(accessors || {}))
end

Class Method Details

.attributesObject



9
10
11
# File 'lib/golden/objects/application/application_form.rb', line 9

def attributes
  accessor_attributes
end

.permitsObject



13
14
15
16
17
18
# File 'lib/golden/objects/application/application_form.rb', line 13

def permits
  @permits ||= lambda do
    attrs = attributes.clone
    attrs
  end.call
end

Instance Method Details

#saveObject

Raises:

  • (NotImplementedError)


37
38
39
# File 'lib/golden/objects/application/application_form.rb', line 37

def save
  raise NotImplementedError
end