Module: DataMapper::Associations::OneToMany
- Defined in:
- lib/autumn/datamapper_hacks.rb
Overview
:nodoc:
Class Method Summary collapse
Class Method Details
.old_setup ⇒ Object
20 |
# File 'lib/autumn/datamapper_hacks.rb', line 20 alias_method :old_setup, :setup |
.setup(name, model, options = {}) ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/autumn/datamapper_hacks.rb', line 21 def setup(name, model, ={}) class_name = .fetch(:class_name, Extlib::Inflection.classify(name)) if not [:old_behavior] and not class_name.include?('::') then modules = model.to_s.split('::') modules.pop modules << class_name [:class_name] = modules.join('::') end old_setup(name, model, ) end |