Class: FormObjects::Base
- Inherits:
-
Object
show all
- Extended by:
- ActiveModel::Naming, Nesting
- Includes:
- ActiveModel::Conversion, ActiveModel::Model, ActiveModel::Validations, Serializer
- Defined in:
- lib/form_objects/base.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Nesting
define_nested_writer_method, nested_form
Methods included from Serializer
#serialized_attributes
Class Method Details
.validates_associated(*attr_names) ⇒ Object
29
30
31
|
# File 'lib/form_objects/base.rb', line 29
def self.validates_associated(*attr_names)
validates_with AssociatedValidator, _merge_attributes(attr_names)
end
|
Instance Method Details
#as_json ⇒ Object
15
16
17
|
# File 'lib/form_objects/base.rb', line 15
def as_json
to_hash.as_json
end
|
#persisted? ⇒ Boolean
25
26
27
|
# File 'lib/form_objects/base.rb', line 25
def persisted?
false
end
|