1. 02 8月, 2012 1 次提交
  2. 01 8月, 2012 2 次提交
  3. 31 7月, 2012 1 次提交
  4. 28 7月, 2012 2 次提交
  5. 25 7月, 2012 1 次提交
  6. 21 7月, 2012 3 次提交
  7. 20 7月, 2012 2 次提交
  8. 14 7月, 2012 4 次提交
  9. 13 7月, 2012 2 次提交
  10. 22 6月, 2012 2 次提交
    • A
      Improve the derivation of HABTM assocation join table names · 46492949
      Andrew White 提交于
      Improve the derivation of HABTM join table name to take account of nesting.
      It now takes the table names of the two models, sorts them lexically and
      then joins them, stripping any common prefix from the second table name.
      
      Some examples:
      
        Top level models
        (Category <=> Product)
        Old: categories_products
        New: categories_products
      
        Top level models with a global table_name_prefix
        (Category <=> Product)
        Old: site_categories_products
        New: site_categories_products
      
        Nested models in a module without a table_name_prefix method
        (Admin::Category <=> Admin::Product)
        Old: categories_products
        New: categories_products
      
        Nested models in a module with a table_name_prefix method
        (Admin::Category <=> Admin::Product)
        Old: categories_products
        New: admin_categories_products
      
        Nested models in a parent model
        (Catalog::Category <=> Catalog::Product)
        Old: categories_products
        New: catalog_categories_products
      
        Nested models in different parent models
        (Catalog::Category <=> Content::Page)
        Old: categories_pages
        New: catalog_categories_content_pages
      
      Also as part of this commit the validity checks for HABTM assocations have
      been moved to ActiveRecord::Reflection One side effect of this is to move when
      the exceptions are raised from the point of declaration to when the association
      is built. This is consistant with other association validity checks.
      46492949
    • C
      4bbd35f7
  11. 20 6月, 2012 1 次提交
  12. 15 6月, 2012 1 次提交
  13. 31 5月, 2012 1 次提交
  14. 29 5月, 2012 1 次提交
    • F
      Add support for CollectionAssociation#delete by Fixnum or String · 39f06984
      Francesco Rodriguez 提交于
      I found the next issue between CollectionAssociation `delete`
      and `destroy`.
      
          class Person < ActiveRecord::Base
            has_many :pets
          end
      
          person.pets.destroy(1)
          # => OK, returns the destroyed object
      
          person.pets.destroy("2")
          # => OK, returns the destroyed object
      
          person.pets.delete(1)
          # => ActiveRecord::AssociationTypeMismatch
      
          person.pets.delete("2")
          # => ActiveRecord::AssociationTypeMismatch
      
      Adding support for deleting with a fixnum or string like
      `destroy` method.
      39f06984
  15. 28 5月, 2012 1 次提交
  16. 27 5月, 2012 1 次提交
  17. 26 5月, 2012 5 次提交
  18. 24 5月, 2012 2 次提交
  19. 23 5月, 2012 7 次提交