Class: Merb::Orms::DataMapper::Finalize

Inherits:
BootLoader
  • Object
show all
Defined in:
lib/merb_datamapper.rb

Class Method Summary collapse

Class Method Details

.runObject



67
68
69
70
71
72
73
74
75
# File 'lib/merb_datamapper.rb', line 67

def self.run
  if DataMapper.respond_to?(:finalize)
    DataMapper.finalize
  else
    DataMapper::Model.descendants.each do |model|
      model.relationships.each_value { |r| r.child_key }
    end
  end
end