- 04 1月, 2011 9 次提交
-
-
由 Jon Leighton 提交于
Fix test_any in relations_test.rb, which was failing when relations_test.rb is run on its own (it passes when the entire suite is run). This is a hacky fix for a problem I didn't quite get to the bottom of, so I'd welcome a better solution...
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
This required changing the code to keep the association proxy for a belongs_to around, despite its target being nil. Which in turn required various changes to the way that stale target checking is handled, in order to support various edge cases (loaded target is nil then foreign key added, foreign key is changed and then changed back, etc). A side effect is that the code is nicer and more succinct. Note that I am removing test_no_unexpected_aliasing since that is basically checking that the proxy for a belongs_to *does* change, which is the exact opposite of the intention of this commit. Also adding various tests for various edge cases and related things. Phew, long commit message!
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
Some basic tests for the :foreign_type option on belongs_to, which was previously completely untested.
-
由 Aaron Patterson 提交于
-
-
-
- 02 1月, 2011 2 次提交
-
-
由 Prem Sichanugrist 提交于
This will make `rails g rspec:install --help` shows "rails generate rspec:install [options]" and not "rails generate install [options]"
-
由 Aaron Patterson 提交于
* jonleighton/association_fixes: Rename AssociationReflection#primary_key_name to foreign_key, since the options key which it relates to is :foreign_key Support for :counter_cache on polymorphic belongs_to Refactor BelongsToAssociation to allow BelongsToPolymorphicAssociation to inherit from it Specify the STI type condition using SQL IN rather than a whole load of ORs. Required a fix to ActiveRecord::Relation#merge for properly merging create_with_value. This also fixes a situation where the type condition was appearing twice in the resultant SQL query. Verify that when has_many associated objects are destroyed via :dependent => :destroy, when the parent is destroyed, the callbacks are run Get rid of extra_conditions param from configure_dependency_for_has_many. I can't see a particularly plausible argument for this being used by plugins, and if they really want they can just redefine the callback or whatever. Note also that before my recent commit the extra_conditions param was completely ignored for :dependent => :destroy. And owner_quoted_id can go too Now we can drop-kick AssociationReflection#dependent_conditions into oblivion. Refactor configure_dependency_for_has_many to use AssociationCollection#delete_all. It was necessary to change test_before_destroy in lifecycle_test.rb so that it checks topic.replies.size *before* doing the destroy, as afterwards it will now (correctly) be 0.
-
- 01 1月, 2011 11 次提交
-
-
由 Santiago Pastorino 提交于
-
由 Santiago Pastorino 提交于
-
由 Jon Leighton 提交于
Rename AssociationReflection#primary_key_name to foreign_key, since the options key which it relates to is :foreign_key
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
Specify the STI type condition using SQL IN rather than a whole load of ORs. Required a fix to ActiveRecord::Relation#merge for properly merging create_with_value. This also fixes a situation where the type condition was appearing twice in the resultant SQL query.
-
由 Jon Leighton 提交于
Verify that when has_many associated objects are destroyed via :dependent => :destroy, when the parent is destroyed, the callbacks are run
-
由 Jon Leighton 提交于
Get rid of extra_conditions param from configure_dependency_for_has_many. I can't see a particularly plausible argument for this being used by plugins, and if they really want they can just redefine the callback or whatever. Note also that before my recent commit the extra_conditions param was completely ignored for :dependent => :destroy.
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
Refactor configure_dependency_for_has_many to use AssociationCollection#delete_all. It was necessary to change test_before_destroy in lifecycle_test.rb so that it checks topic.replies.size *before* doing the destroy, as afterwards it will now (correctly) be 0.
-
- 31 12月, 2010 10 次提交
-
-
由 Piotr Sarnacki 提交于
-
由 Piotr Sarnacki 提交于
-
由 Piotr Sarnacki 提交于
Don't be so picky on MissingTemplate error details, this fails randomly on 1.8.7 because of not ordered hash
-
由 Nick Sutterer 提交于
-
-
由 Ryan Bigg 提交于
-
由 Ryan Bigg 提交于
-
由 Ryan Bigg 提交于
-
由 Timothy N. Tsvetkov 提交于
[#6044 state:committed] Signed-off-by: NSantiago Pastorino <santiago@wyeworks.com>
-
由 Pratik Naik 提交于
-
- 30 12月, 2010 6 次提交
-
-
由 Xavier Noria 提交于
It turns out aptitude has been removed from Ubuntu 10.10 and while you can manually install it, apt-get is the blessed package manager. Google for "aptitude removed from Ubuntu" for more details. Thanks to Rafael Mendonça França for pointing this out.
-
由 Nick Sutterer 提交于
-
-
由 Pratik Naik 提交于
-
由 David Heinemeier Hansson 提交于
-
由 Pratik Naik 提交于
-
- 29 12月, 2010 2 次提交
-
-
由 Cheah Chu Yeow 提交于
-
由 Cheah Chu Yeow 提交于
-