Class: Admin::Positionable

Inherits:
Object
  • Object
show all
Extended by:
ActiveModel::Naming, ActiveModel::Translation
Includes:
ActiveModel::Conversion, ActiveModel::Validations
Defined in:
app/controllers/admin/positionables_controller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(positionables) ⇒ Positionable

Returns a new instance of Positionable.



10
11
12
# File 'app/controllers/admin/positionables_controller.rb', line 10

def initialize(positionables)
  @positionables = positionables
end

Instance Attribute Details

#positionablesObject

Returns the value of attribute positionables.



9
10
11
# File 'app/controllers/admin/positionables_controller.rb', line 9

def positionables
  @positionables
end

Instance Method Details

#idObject



18
19
20
# File 'app/controllers/admin/positionables_controller.rb', line 18

def id
  @positionables.klass.name
end

#persisted?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'app/controllers/admin/positionables_controller.rb', line 14

def persisted?
  true
end