module ScaffoldingExtensions::DataMapper

  1. lib/scaffolding_extensions/model/datamapper.rb

Instance methods added to DataMapper::Resource to allow it to work with Scaffolding Extensions.

Methods

Public Instance

  1. scaffold_attribute_value
  2. scaffold_id

Public Instance methods

scaffold_attribute_value (field)

Get value for given attribute

[show source]
# File lib/scaffolding_extensions/model/datamapper.rb, line 50
def scaffold_attribute_value(field)
  self[field]
end
scaffold_id ()

the value of the primary key for this object

[show source]
# File lib/scaffolding_extensions/model/datamapper.rb, line 55
def scaffold_id
  get_key_array_safe(self.key)
end