Sha256: 839756aaf9a282c9b808cdcacffe21b9b6871ca710aac53c73ad8c176397d6f7
Contents?: true
Size: 993 Bytes
Versions: 7
Compression:
Stored size: 993 Bytes
Contents
The DataMapper module has some quirks, mainly: 1. For models that have the "storage_name" explicitly defined, the "has n, :through => Resource" relation doesn't work well. Don't use models, that have non-standard table names, or create the habtm resource by hand (check the test application) 2. Because DataMapper uses a module instead of a superclass, you have to add the appropriate scaffolding_extensions modules by hand. The simplest way is to use the `add_scaffolding_methods` method in your controller, or initialization script: class Dm < Merb::Controller add_scaffolding_methods [DmOfficer, DmMeeting, DmEmployee, DmGroup, DmPosition] scaffold DmOfficer scaffold DmMeeting scaffold_all_models :only =>[DmEmployee, DmGroup, DmPosition] end You need dm-core, dm-validations, dm-transactions to use scaffolding extensions with datamapper. You also need do_sqlite3 in order to run the test_suite for scaffolding_extensions with datamapper.
Version data entries
7 entries across 7 versions & 1 rubygems