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
50:   def scaffold_attribute_value(field)
51:     self[field]
52:   end
scaffold_id ()

the value of the primary key for this object

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