Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source
Show
Ignore:
Timestamp:
04/01/08 06:33:16 (5 months ago)
Author:
bitsweat
Message:

Ruby 1.9 compat: delete DEFAULTS key from Hash not Omap array

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activerecord/lib/active_record/fixtures.rb

    r9093 r9191  
    562562 
    563563    # allow a standard key to be used for doing defaults in YAML 
    564     delete(assoc("DEFAULTS")) 
     564    if is_a?(Hash) 
     565      delete('DEFAULTS') 
     566    else 
     567      delete(assoc('DEFAULTS')) 
     568    end 
    565569 
    566570    # track any join tables we need to insert later