Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | quarantine more deprecated stuff | Jon Leighton | 2012-05-18 | 1 | -9/+0 |
| | |||||
* | quarantine deprecated tests | Jon Leighton | 2012-05-18 | 1 | -333/+2 |
| | |||||
* | Return false for exists? with new records - fixes #6199. | Andrew White | 2012-05-10 | 1 | -0/+1 |
| | |||||
* | Use `take` instead of `first` to avoid unwanted implicit ordering (fixes #6147) | Marcelo Silveira | 2012-05-05 | 1 | -0/+4 |
| | |||||
* | Introducing `take` as a replacement to the old behavior of `first` | Marcelo Silveira | 2012-05-02 | 1 | -2/+24 |
| | |||||
* | Made `first` finder consistent among database engines by adding a | Marcelo Silveira | 2012-05-02 | 1 | -0/+6 |
| | | | | default order clause (fixes #5103) | ||||
* | remove deprecated calls | Jon Leighton | 2012-04-27 | 1 | -22/+21 |
| | |||||
* | more deprecations manually fixed | Jon Leighton | 2012-04-27 | 1 | -20/+15 |
| | |||||
* | find and replace deprecated keys | Jon Leighton | 2012-04-27 | 1 | -46/+46 |
| | |||||
* | %s/find(:\(first\|last\|all\), \([^()]*\))/scoped(\2).\1/gcI amongst other ↵ | Jon Leighton | 2012-04-27 | 1 | -130/+53 |
| | | | | things | ||||
* | remove calls to find(:first), find(:last) and find(:all) | Jon Leighton | 2012-04-26 | 1 | -1/+1 |
| | |||||
* | remove deprecate #all usage | Jon Leighton | 2012-04-26 | 1 | -1/+1 |
| | |||||
* | remove deprecate #calculate calls | Jon Leighton | 2012-04-26 | 1 | -6/+0 |
| | |||||
* | fix #scoped deprecations | Jon Leighton | 2012-04-26 | 1 | -5/+5 |
| | |||||
* | remove tests for #with_scope (it's now deprecated) | Jon Leighton | 2012-04-25 | 1 | -14/+0 |
| | |||||
* | fix tests | Jon Leighton | 2012-04-13 | 1 | -2/+2 |
| | |||||
* | Add dynamic find_or_create_by_{attribute}! method. | Andrew White | 2012-03-12 | 1 | -0/+22 |
| | |||||
* | fix activerecord query_method regression with offset into Fixnum | Denis Jean | 2012-03-12 | 1 | -0/+4 |
| | | | | | | add test to show offset query_methods on mysql & mysql2 change test to cover public API | ||||
* | Fix regression from Rails 3.1 | Paul McMahon | 2012-01-27 | 1 | -0/+11 |
| | | | | | | Under Rails 3.1, you were allowed to pass a hash to a find_or_create method with multiple attribute names, but this was broken as the arguments were being improperly validated. | ||||
* | Deprecate inferred JOINs with includes + SQL snippets. | Jon Leighton | 2012-01-16 | 1 | -3/+6 |
| | | | | | | See the CHANGELOG for details. Fixes #950. | ||||
* | Revert "Deprecate implicit eager loading. Closes #950." | Jon Leighton | 2012-01-16 | 1 | -3/+3 |
| | | | | This reverts commit c99d507fccca2e9e4d12e49b4387e007c5481ae9. | ||||
* | Deprecate implicit eager loading. Closes #950. | Jon Leighton | 2011-12-29 | 1 | -3/+3 |
| | |||||
* | Deprecate set_primary_key in favour of self.primary_key= | Jon Leighton | 2011-11-29 | 1 | -1/+1 |
| | |||||
* | Fixes issue #3483, regarding using a mixture of ranges and discrete values ↵ | Ryan Naughton | 2011-11-14 | 1 | -1/+1 |
| | | | | in find conditions. Paired with Joey Schoblaska. | ||||
* | Failing test case for issue #3483 | Gabriel Sobrinho | 2011-11-14 | 1 | -0/+4 |
| | |||||
* | exclude ORDER BY clause when querying Relation#exists? | Akira Matsuda | 2011-11-09 | 1 | -0/+5 |
| | |||||
* | Add ROWNUM to test first and last to support Oracle. | Yasuo Honda | 2011-09-07 | 1 | -2/+2 |
| | |||||
* | Merge pull request #2485 from akaspick/exists_fix | Jon Leighton | 2011-09-07 | 1 | -0/+9 |
|\ | | | | | fix exists? to return false if passed nil (which may come from a missing | ||||
| * | fix exists? to return false if passed nil (which may come from a missing URL ↵ | Andrew Kaspick | 2011-08-10 | 1 | -0/+9 |
| | | | | | | | | param) | ||||
* | | Use LIMIT sql word in last when it's possible | Damien Mathieu | 2011-09-05 | 1 | -1/+18 |
| | | |||||
* | | use LIMIT SQL word in first - Closes #2783 | Damien Mathieu | 2011-09-05 | 1 | -0/+9 |
|/ | |||||
* | Raise an ArgumentError if user passing less number of argument in the ↵ | Prem Sichanugrist | 2011-07-17 | 1 | -0/+8 |
| | | | | | | | | | | | | | 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) | ||||
* | formats | Akira Matsuda | 2011-07-09 | 1 | -5/+5 |
| | |||||
* | fix AR having() not to raise NoMethodError when the given argument does not ↵ | Akira Matsuda | 2011-07-09 | 1 | -0/+7 |
| | | | | | | respond to empty? having raises NoMethodError: undefined method `empty?' when a Fixnum or Date/Time were passed via varargs | ||||
* | please use ruby -I lib:test path/to/test.rb, or export RUBY_OPT | Aaron Patterson | 2011-06-06 | 1 | -1/+1 |
| | |||||
* | Refactor Active Record test connection setup. Please see the ↵ | Jon Leighton | 2011-06-04 | 1 | -1/+1 |
| | | | | 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. | ||||
* | Fix for #371 | Nick Howard | 2011-05-08 | 1 | -0/+21 |
| | | | | | | | | | | | | 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. | ||||
* | supporting nil when passed in as an IN clause | Aaron Patterson | 2011-04-29 | 1 | -3/+4 |
| | |||||
* | Test that passing nil member of array in conditions retrieves records with nil | gmile | 2011-04-29 | 1 | -0/+22 |
| | | | | value on a selected field. | ||||
* | Return nil from read_attribute(:foo) if 'foo' is not present in the ↵ | Jon Leighton | 2011-04-15 | 1 | -1/+2 |
| | | | | @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. | ||||
* | test against AR class rather than the relation (thanks Andrew White!) | Aaron Patterson | 2011-03-29 | 1 | -2/+2 |
| | |||||
* | order is not guaranteed by this select, so add an order and call first! | Aaron Patterson | 2011-03-29 | 1 | -1/+1 |
| | |||||
* | Delegate first!, last!, any? and many? to scoped | Andrew White | 2011-03-29 | 1 | -0/+16 |
| | |||||
* | Change exists? so that it doesn't instantiate records [#6127 state:resolved] | Andrew White | 2011-03-29 | 1 | -0/+5 |
| | |||||
* | add #first! and #last! to models & relations | Josh Susser | 2011-03-24 | 1 | -0/+24 |
| | |||||
* | Merge branch 'master' into nested_has_many_through | Jon Leighton | 2011-03-04 | 1 | -1/+1 |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 | ||||
| * | using arel to compile sql statements | Aaron Patterson | 2010-12-25 | 1 | -1/+1 |
| | | |||||
* | | Merge branch 'master' into nested_has_many_through | Jon Leighton | 2010-11-17 | 1 | -22/+32 |
|\| | | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations/has_many_through_association.rb activerecord/test/cases/associations/has_many_through_associations_test.rb | ||||
| * | removing many unused variables | Aaron Patterson | 2010-11-16 | 1 | -1/+1 |
| | | |||||
| * | Finder gives a little bit more info on the lookup column (primary key) | Franck Verrot | 2010-11-13 | 1 | -0/+10 |
| | |