datamapper tips

model.storage_name(self.name)

[236, 245] in /gems/dm-core-1.2.0.rc1/lib/dm-core/model.rb
   236      #   the storage name (ie., table name, for database stores) associated with
   237      #   this resource in the given repository
   238      #
   239      # @api public
   240      def storage_name(repository_name = default_repository_name)
=> 241        storage_names[repository_name] ||= repository(repository_name).adapter.resource_naming_convention.call(default_storage_name).freeze
   242      end

/gems/dm-core-1.2.0.rc1/lib/dm-core/repository.rb
145     def create(resources)
146       adapter.create(resources)
147     end

dm-core-1.2.0.rc1/lib/dm-core/resource/persistence_state/transient.rb
60         def create_resource
61           repository.create([ resource ])
62         end



你可能感兴趣的:(datamapper)