Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 270

Show
Ignore:
Timestamp:
12/28/04 16:27:08 (4 years ago)
Author:
david
Message:

Fixed that the const_missing autoload assumes the requested constant is set by require_association and calls const_get to retrieve it. If require_association did not set the constant then const_get will call const_missing, resulting in an infinite loop #380 [bitsweat]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activerecord/CHANGELOG

    r260 r270  
    1 *1.3.0* 
     1*SVN* 
     2 
     3* Added the possibility for adapters to overwrite add_limit! to implement a different limiting scheme than "LIMIT X" used by MySQL, PostgreSQL, and SQLite. 
     4 
     5* Fixed that the const_missing autoload assumes the requested constant is set by require_association and calls const_get to retrieve it.  
     6  If require_association did not set the constant then const_get will call const_missing, resulting in an infinite loop #380 [bitsweat] 
     7 
     8* Added the possibility of having objects with acts_as_list created before their scope is available or... 
     9 
     10 
     11*1.3.0* (December 23, 2004) 
    212 
    313* Added a require_association hook on const_missing that makes it possible to use any model class without requiring it first. This makes STI look like: 
  • trunk/activerecord/lib/active_record/associations.rb

    r252 r270  
    1919        begin 
    2020          require_association(Inflector.underscore(Inflector.demodulize(class_id.to_s))) 
    21           return Object.const_get(class_id) if Object.const_get(class_id).ancestors.include?(ActiveRecord::Base) 
     21          return Object.const_get(class_id) if Object.const_defined?(class_id) && Object.const_get(class_id).ancestors.include?(ActiveRecord::Base) 
    2222        rescue LoadError 
    2323          pre_association_const_missing(class_id)