Changeset 8282
- Timestamp:
- 12/05/07 14:28:05 (9 months ago)
- Files:
-
- trunk/activerecord/CHANGELOG (modified) (1 diff)
- trunk/activerecord/lib/active_record/base.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activerecord/CHANGELOG
r8281 r8282 1 1 *SVN* 2 3 * Give examples for what tables should be called for models inside a module namespace. Closes #10288 [scott_willson] 2 4 3 5 * Document the :message option for validates_associated. Closes #10357 [dylans] trunk/activerecord/lib/active_record/base.rb
r8280 r8282 722 722 # Guesses the table name (in forced lower-case) based on the name of the class in the inheritance hierarchy descending 723 723 # directly from ActiveRecord. So if the hierarchy looks like: Reply < Message < ActiveRecord, then Message is used 724 # to guess the table name fromeven when called on Reply. The rules used to do the guess are handled by the Inflector class724 # to guess the table name even when called on Reply. The rules used to do the guess are handled by the Inflector class 725 725 # in Active Support, which knows almost all common English inflections. You can add new inflections in config/initializers/inflections.rb. 726 726 # 727 727 # Nested classes are given table names prefixed by the singular form of 728 # the parent's table name. Example: 728 # the parent's table name. Enclosing modules are not considered. Examples: 729 # 730 # class Invoice < ActiveRecord::Base; end; 729 731 # file class table_name 730 732 # invoice.rb Invoice invoices 731 # invoice/lineitem.rb Invoice::Lineitem invoice_lineitems 733 # 734 # class Invoice < ActiveRecord::Base; class Lineitem < ActiveRecord::Base; end; end; 735 # file class table_name 736 # invoice.rb Invoice::Lineitem invoice_lineitems 737 # 738 # module Invoice; class Lineitem < ActiveRecord::Base; end; end; 739 # file class table_name 740 # invoice/lineitem.rb Invoice::Lineitem lineitems 732 741 # 733 742 # Additionally, the class-level table_name_prefix is prepended and the