Class: Id::Form::ActiveModelForm
- Inherits:
-
Object
- Object
- Id::Form::ActiveModelForm
show all
- Extended by:
- ActiveModel::Naming
- Includes:
- ActiveModel::Conversion, ActiveModel::Validations
- Defined in:
- lib/id/form/active_model_form.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of ActiveModelForm.
12
13
14
|
# File 'lib/id/form/active_model_form.rb', line 12
def initialize(model)
@model = model
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
26
27
28
|
# File 'lib/id/form/active_model_form.rb', line 26
def method_missing(name, *args, &block)
model.send(name, *args, &block)
end
|
Class Method Details
.i18n_scope ⇒ Object
8
9
10
|
# File 'lib/id/form/active_model_form.rb', line 8
def self.i18n_scope
:id
end
|
Instance Method Details
#persisted? ⇒ Boolean
16
17
18
|
# File 'lib/id/form/active_model_form.rb', line 16
def persisted?
false
end
|
#to_model ⇒ Object
20
21
22
|
# File 'lib/id/form/active_model_form.rb', line 20
def to_model
self
end
|