Class: ActiveAdmin::Model
- Inherits:
-
Object
- Object
- ActiveAdmin::Model
- Defined in:
- lib/active_admin/resource/model.rb
Instance Method Summary collapse
-
#initialize(resource, record) ⇒ Model
constructor
A new instance of Model.
- #to_model ⇒ Object
Constructor Details
#initialize(resource, record) ⇒ Model
Returns a new instance of Model.
4 5 6 7 8 9 10 |
# File 'lib/active_admin/resource/model.rb', line 4 def initialize(resource, record) @record = record if resource @record.extend(resource.resource_name_extension) end end |
Instance Method Details
#to_model ⇒ Object
12 13 14 |
# File 'lib/active_admin/resource/model.rb', line 12 def to_model @record end |