| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
| |
- adds tests for find_or_create_by and find_or_initialize_by on has_many associations
- changes the behavior of ActiveRecord::Associations::CollectionProxy#method_missing to differ to
ActiveRecord::FinderMethods#find_or_instantiator_by_attributes for arg processing and saving so
find_or_create_by's api on associations will be consistent w/ the api for model classes.
|
|
|
|
| |
favour of defining a 'default_scope' class method in the model. See the CHANGELOG for more details.
|
|
|
|
| |
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
|
|
|
|
|
| |
This reverts commit 45c233ef819dc7b67e259dd73f24721fec28b8c8.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
|
|
|
| |
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
|
|
|
| |
... } rather than instance_eval-ing strings
|
|
|
|
| |
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.
|
|
|
|
| |
should return self.
|
|
|
|
| |
#replace which was previously incorrect, but the test passed due to the fact that to_a was not duping.
|
| |
|
|
|
|
| |
this can affect validations/callbacks/etc inside the record itself [#6252 state:resolved]
|
|
|
|
| |
replaced
|
|
|
|
| |
counter cache when deleting records
|
| |
|
|
|
|
| |
objects. Thanks Brian Palmer [#5802 state:resolved]
|
|
|
|
|
|
| |
already loaded association list with an empty hash then do not perform another sql
[#5972 state:resolved]
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- persisted? is the API defined in ActiveModel
- makes it easier for extension libraries to conform to ActiveModel APIs
without concern for whether the extended object is specifically
ActiveRecord
[#5927 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
|
|
|
| |
method [#3472 state:resolved]
|
|
|
|
|
|
| |
[#5562 state:resolved]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
child should be respected.
author.posts.create should take into account default_scope
defined on post.
[#3939: state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
| |
better default failure messages - let's use them
|
|
|
|
|
|
| |
attributes through an association
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
| |
|
|
|
|
|
|
|
|
| |
association which has finder_sql or counter_sql
[#2395 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
|
|
| |
[#5076 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
| |
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
|
|
|
|
|
| |
[#1108 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
|
|
|
| |
(as otherwise was failing under JRuby and oracle_enhanced adapter)
|
|
|
|
|
|
| |
[#4645 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
|
|
| |
association [#2896 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
|
|
|
|
|
|
|
|
| |
:dependent => :___
[#2627 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
| |
|
|
|
|
|
|
| |
option
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
I think it may of broke the build. Lets see.
This reverts commit 49e943c4f0ac3459bd53023167aaa08fc8e46733.
Conflicts:
activerecord/test/cases/associations/has_many_associations_test.rb
|
|
|
|
|
|
|
|
| |
Due to the ordering of the returning result set, the test fails under the postgresql adapter. Order results by id prior to checking the first item
[#3542 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
|
|
|
|
|
|
|
| |
In the current stable, ActiveRecord::Associations::AssociationProxy#method_missing calls yield() if a block is given, causing the block to always be evaluated in its calling context. However, in the case of instance_eval, correct behavior requires that the block be passed directly to the @target, rather than being evaluated inside a different block. Incidentally, this also simplifies the code slightly.
[#3412 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
|
|
|
|
|
| |
:delete_all
Signed-off-by: Michael Koziarski <michael@koziarski.com>
|
|
|
|
|
|
| |
notifying events that are actually being consumed.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
|
| |
|
|
|
|
|
|
| |
[#1196 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
|
|
|
|
|
| |
model [#2719 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
|
|
|
|
|
|
| |
state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
|
|
|
|
|
|
| |
status:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
|
|
|
|
| |
Oracle tests were failing
Oracle stores '' string as NULL
Oracle cannot have identifiers larger than 30 characters
added missing fixtures to test setup method
|
|
|
|
|
|
|
|
|
| |
a newline character immediately following 'SELECT' [#2118 state:resolved]""
This reverts commit 80f1f863cd0f9cba89079511282de5710a2e1832.
The feature doesn't work on Postgres, so don't test it on Postgres.
Also, Postgres compatibility is irrelevant to the ticket/patch in question.
|
|
|
|
|
|
|
|
| |
newline character immediately following 'SELECT' [#2118 state:resolved]"
This reverts commit 4851ca9e13a4317342df02ae25b1929340523f7a.
The tests do not pass for postgresql.
|