Class: Reform::Contract
- Inherits:
-
Object
- Object
- Reform::Contract
- Extended by:
- Forwardable, PropertyMethods, Uber::InheritableAttr
- Defined in:
- lib/reform/contract.rb,
lib/reform/contract/setup.rb
Overview
Gives you a DSL for defining the object structure and its validations.
Direct Known Subclasses
Defined Under Namespace
Modules: PropertyMethods, Setup, Validate Classes: Errors, Fields
Constant Summary collapse
- RESERVED_METHODS =
TODO: refactor that so we don’t need that.
[:model, :aliased_model, :fields, :mapper]
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
FIXME: this is needed for Rails 3.0 compatibility.
-
#model ⇒ Object
(also: #aliased_model)
Returns the value of attribute model.
Method Summary
Methods included from PropertyMethods
collection, properties, property, setup_form_definition
Methods included from Validate
Methods included from Setup
#create_fields, #initialize, #setup_fields
Instance Attribute Details
#errors ⇒ Object
FIXME: this is needed for Rails 3.0 compatibility.
90 91 92 |
# File 'lib/reform/contract.rb', line 90 def errors # FIXME: this is needed for Rails 3.0 compatibility. @errors ||= Errors.new(self) end |
#model ⇒ Object Also known as: aliased_model
Returns the value of attribute model.
82 83 84 |
# File 'lib/reform/contract.rb', line 82 def model @model end |