Class: ActiveAdmin::Model

Inherits:
Object
  • Object
show all
Defined in:
lib/active_admin/resource/model.rb

Instance Method Summary collapse

Constructor Details

#initialize(resource, record) ⇒ Model

Returns a new instance of Model.


3
4
5
6
7
8
9
# File 'lib/active_admin/resource/model.rb', line 3

def initialize(resource, record)
  @record = record

  if resource
    @record.extend(resource.resource_name_extension)
  end
end

Instance Method Details

#to_modelObject


11
12
13
# File 'lib/active_admin/resource/model.rb', line 11

def to_model
  @record
end