Module: Reform::Form::ActiveModel
- Defined in:
- lib/reform/form/active_model/model_validations.rb,
lib/reform/form/active_model/form_builder_methods.rb,
lib/reform/form/active_model.rb
Defined Under Namespace
Modules: ClassMethods, FormBuilderMethods, ModelReflections, ModelValidations
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.included(base) ⇒ Object
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/reform/form/active_model.rb', line 2
def self.included(base)
base.class_eval do
extend ClassMethods
register_feature ActiveModel
delegations = Module.new do
delegate :persisted?, :to_key, :to_param, :id, to: :model
end
include delegations
def to_model self
end
end
end
|
Instance Method Details
#model_name(*args) ⇒ Object
98
99
100
|
# File 'lib/reform/form/active_model.rb', line 98
def model_name(*args)
self.class.model_name(*args)
end
|