Module: ScaffoldingExtensions::DataMapper
- Defined in:
- lib/scaffolding_extensions/model/datamapper.rb
Overview
Instance methods added to DataMapper::Resource to allow it to work with Scaffolding Extensions.
Instance Method Summary collapse
-
#scaffold_attribute_value(field) ⇒ Object
Get value for given attribute.
-
#scaffold_id ⇒ Object
the value of the primary key for this object.
Instance Method Details
#scaffold_attribute_value(field) ⇒ Object
Get value for given attribute
50 51 52 |
# File 'lib/scaffolding_extensions/model/datamapper.rb', line 50 def scaffold_attribute_value(field) self[field] end |
#scaffold_id ⇒ Object
the value of the primary key for this object
55 56 57 |
# File 'lib/scaffolding_extensions/model/datamapper.rb', line 55 def scaffold_id get_key_array_safe(self.key) end |