- 22 2月, 2011 3 次提交
-
-
由 Jon Leighton 提交于
Delegate Association#options to the reflection, and replace 'reflection.options' with 'options'. Also add through_options and source_options methods for through associations.
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
Associations - where possible, call attributes methods rather than directly accessing the instance variables
-
- 19 2月, 2011 2 次提交
-
-
由 Emilio Tagua 提交于
-
由 Emilio Tagua 提交于
-
- 18 2月, 2011 3 次提交
-
-
由 Jon Leighton 提交于
Split AssociationProxy into an Association class (and subclasses) which manages the association, and a CollectionProxy class which is *only* a proxy. Singular associations no longer have a proxy. See CHANGELOG for more.
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
Allow building and then later saving has_many :through records, such that the join record is automatically saved too. This requires the :inverse_of option to be set on the source association in the join model. See the CHANGELOG for details. [#4329 state:resolved]
-
- 15 2月, 2011 1 次提交
-
-
由 Emilio Tagua 提交于
-
- 14 2月, 2011 9 次提交
-
-
由 Jon Leighton 提交于
Add a transaction wrapper in add_to_target. This means that #build will now also use a transaction. IMO this is reasonable given that the before_add and after_add callbacks might do anything, and this great consistency allows us to abstract out the duplicate code from #build and #create.
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
Add interpolation of association conditions back in, in the form of proc { ... } rather than instance_eval-ing strings
-
- 13 2月, 2011 2 次提交
-
-
由 Ernie Miller 提交于
-
由 Ernie Miller 提交于
[#6423 state:committed] Signed-off-by: NSantiago Pastorino <santiago@wyeworks.com>
-
- 08 2月, 2011 6 次提交
-
-
由 Aaron Patterson 提交于
-
由 Jon Leighton 提交于
Refactor the implementations of AssociatioCollection#delete and #destroy to be more consistent with each other, and to stop passing blocks around, thus making the execution easier to follow.
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
Correctly update counter caches on deletion for has_many :through [#2824 state:resolved]. Also fixed a bunch of other counter cache bugs in the process, as once I fixed this one others started appearing like nobody's business.
-
由 Jon Leighton 提交于
Support the :dependent option on has_many :through associations. For historical and practical reasons, :delete_all is the default deletion strategy employed by association.delete(*records), despite the fact that the default strategy is :nullify for regular has_many. Also, this only works at all if the source reflection is a belongs_to. For other situations, you should directly modify the through association.
-
由 Jon Leighton 提交于
Make record.association.destroy(*records) on habtm and hm:t only delete records in the join table. This is to make the destroy method more consistent across the different types of associations. For more details see the CHANGELOG entry.
-
- 02 2月, 2011 1 次提交
-
-
由 Santiago Pastorino 提交于
-
- 01 2月, 2011 1 次提交
-
-
由 Glenn Vanderburg 提交于
Signed-off-by: NSantiago Pastorino <santiago@wyeworks.com>
-
- 30 1月, 2011 12 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
Has many through - It is not necessary to manually merge in the conditions hash for the through record, because the creation is done directly on the through association, which will already handle setting the conditions.
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
AssociationCollection#to_ary should definitely dup the target! Also changed #replace which was previously incorrect, but the test passed due to the fact that to_a was not duping.
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-