| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Also skip persistente tests related to UPDATE + ORDER BY for postgresql
PostgreSQL does not support updates with order by, and these tests are
failing randomly depending on the fixture loading order now.
|
|
|
|
|
|
| |
add test to show offset query_methods on mysql & mysql2
change test to cover public API
|
|
|
|
|
|
|
|
|
| |
(cherry picked from commit 5282485d310d1a6ffcf55e4e7f56ab234e16880d)
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/dynamic_finder_match.rb
|
|
|
|
| |
Fix regression from Rails 3.1
|
| |
|
|
|
|
| |
in find conditions. Paired with Joey Schoblaska.
|
| |
|
| |
|
| |
|
|\
| |
| | |
fix exists? to return false if passed nil (which may come from a missing
|
| |
| |
| |
| | |
param)
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dynamic finder
The previous behavior was unintentional, and some people was relying on it. Now the dynamic finder will always expecting the number of arguments to be equal or greater (so you can still pass the options to it.)
So if you were doing this and expecting the second argument to be nil:
User.find_by_username_and_group("sikachu")
You'll now get `ArgumentError: wrong number of arguments (1 for 2).` You'll then have to do this:
User.find_by_username_and_group("sikachu", nil)
|
| |
|
|
|
|
|
|
| |
respond to empty?
having raises NoMethodError: undefined method `empty?' when a Fixnum or Date/Time were passed via varargs
|
| |
|
|
|
|
| |
RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
|
|
|
|
|
|
|
|
|
|
|
|
| |
if a query contains a limit or an offset, ActiveRecord::FinderMethods#find_last had inconsistent behavior.
If the records were loaded, it returned the last record in the cached list.
If they were not, it reversed the order of the query and changed the limit to one.
If the earlier limit was less than the total matching the query in the db,
it would return a different record than if the records had been cached.
This commit changes find_last so that it loads the records when getting the
last record on a query containing a limit or an offset, which makes the behavior consistent.
|
| |
|
|
|
|
| |
value on a selected field.
|
|
|
|
| |
@attributes hash, but the _foo method has been defined. This brings the behaviour into line with the 3-0-stable branch and the master branch before 93641ed6c8c684f6b4db02b6c8a22fa9bc7f0eaf (there were previously no assertions about this which is why the change slipped through). Note that actually calling the 'foo' method will still raise an error if the attribute is not present.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
activerecord/CHANGELOG
activerecord/lib/active_record/association_preload.rb
activerecord/lib/active_record/associations.rb
activerecord/lib/active_record/associations/class_methods/join_dependency.rb
activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb
activerecord/lib/active_record/associations/has_many_association.rb
activerecord/lib/active_record/associations/has_many_through_association.rb
activerecord/lib/active_record/associations/has_one_association.rb
activerecord/lib/active_record/associations/has_one_through_association.rb
activerecord/lib/active_record/associations/through_association_scope.rb
activerecord/lib/active_record/reflection.rb
activerecord/test/cases/associations/has_many_through_associations_test.rb
activerecord/test/cases/associations/has_one_through_associations_test.rb
activerecord/test/cases/reflection_test.rb
activerecord/test/cases/relations_test.rb
activerecord/test/fixtures/memberships.yml
activerecord/test/models/categorization.rb
activerecord/test/models/category.rb
activerecord/test/models/member.rb
activerecord/test/models/reference.rb
activerecord/test/models/tagging.rb
|
| | |
|
|\|
| |
| |
| |
| |
| | |
Conflicts:
activerecord/lib/active_record/associations/has_many_through_association.rb
activerecord/test/cases/associations/has_many_through_associations_test.rb
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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>
|
| |
| |
| |
| | |
was previously untested
|
| |
| |
| |
| | |
through association
|
| |
| |
| |
| | |
including adding some explanatory comments, but more importantly structures it in such a way as to allow a JoinAssociation to produce an arbitrary number of actual joins, which will be necessary for nested has many through support. Also added 3 tests covering functionality which existed but was not previously covered.
|
|/
|
|
| |
fixes, rather than just making the tests pass again)
|
| |
|
|
|
|
| |
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
|
|
|
|
|
| |
[#5153 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
|
|
| |
[#4652 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
|
|
|
|
| |
object and a message of error
[#4611 state:committed]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
|
|
|
|
|
| |
and a hash [#4457 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
|
|
|
| |
adapter relying on it.
|
| |
|
| |
|
| |
|
|
|
|
| |
remove method caching
|
|
|
|
| |
dynamic method caching
|
| |
|