Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Reset the primary key for other tests | Andrew White | 2013-04-24 | 1 | -0/+2 |
| | |||||
* | rename `Relation#uniq` to `Relation#distinct`. `#uniq` still works. | Yves Senn | 2013-03-15 | 1 | -1/+1 |
| | | | | | | | | The similarity of `Relation#uniq` to `Array#uniq` is confusing. Since our Relation API is close to SQL terms I renamed `#uniq` to `#distinct`. There is no deprecation. `#uniq` and `#uniq!` are aliases and will continue to work. I also updated the documentation to promote the use of `#distinct`. | ||||
* | Reverting 16f6f25 (Change behaviour with empty array in where clause) | Guillermo Iguaran | 2013-02-08 | 1 | -0/+9 |
| | |||||
* | Change behaviour with empty array in where clause | robertomiranda | 2013-02-08 | 1 | -9/+0 |
| | |||||
* | CVE-2012-5664 options hashes should only be extracted if there are extra ↵ | Aaron Patterson | 2013-01-02 | 1 | -0/+12 |
| | | | | | | | parameters Conflicts: activerecord/lib/active_record/dynamic_matchers.rb | ||||
* | Assert the query result instead of checking for nothing raised | Carlos Antonio da Silva | 2012-11-13 | 1 | -4/+2 |
| | | | | | | | Nothing should be raised anyway :smile: Thanks @spastorino :heart: https://github.com/rails/rails/pull/8202/files#r2112067 | ||||
* | Regression test for #7238 | Nikita Afanasenko | 2012-11-13 | 1 | -0/+7 |
| | |||||
* | Raise MissingAttributeError on query methods | Ernie Miller | 2012-09-08 | 1 | -0/+1 |
| | | | | | | | | | | | | | When calling a query method on an attribute that was not selected by an ActiveRecord query, an ActiveModel::MissingAttributeError is not raised. Instead, a nil value is returned, which will return false once cast to boolean. This is undesirable, as we should not give the impression that we know the attribute's boolean value when we haven't loaded the attribute's (possibly) non-boolean value from the database. This issue is present on versions going back as far as 2.3, at least. | ||||
* | Remove ActiveRecord::Base.to_a | Jon Leighton | 2012-08-03 | 1 | -1/+1 |
| | | | | | On reflection, it seems like a bit of a weird method to have on ActiveRecord::Base, and it shouldn't be needed most of the time anyway. | ||||
* | Revert "Removing composed_of from ActiveRecord." | Rafael Mendonça França | 2012-07-27 | 1 | -0/+99 |
| | | | | | | | | | | | This reverts commit 14fc8b34521f8354a17e50cd11fa3f809e423592. Reason: we need to discuss a better path from this removal. Conflicts: activerecord/lib/active_record/reflection.rb activerecord/test/cases/base_test.rb activerecord/test/models/developer.rb | ||||
* | Deprecate ActiveRecord::Base.scoped. | Jon Leighton | 2012-07-27 | 1 | -69/+69 |
| | | | | | | | It doesn't serve much purpose now that ActiveRecord::Base.all returns a Relation. The code is moved to active_record_deprecated_finders. | ||||
* | ActiveRecord::Base.all returns a Relation. | Jon Leighton | 2012-07-27 | 1 | -17/+17 |
| | | | | | | | | | | | Previously it returned an Array. If you want an array, call e.g. `Post.to_a` rather than `Post.all`. This is more explicit. In most cases this should not break existing code, since Relations use method_missing to delegate unknown methods to #to_a anyway. | ||||
* | exists?(false) returns false | Egor Lynko | 2012-06-25 | 1 | -0/+4 |
| | | | | `FinderMethods#exists?` finder method now returns *false* with the *false* argument | ||||
* | made dynamic finders alias_attribute aware | Maximilian Schneider | 2012-06-22 | 1 | -0/+5 |
| | | | | | previously dynamic finders only worked in combination with the actual column name and not its alias defined with #alias_attribute | ||||
* | Removing composed_of from ActiveRecord. | Steve Klabnik | 2012-06-18 | 1 | -99/+0 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature adds a lot of complication to ActiveRecord for dubious value. Let's talk about what it does currently: class Customer < ActiveRecord::Base composed_of :balance, :class_name => "Money", :mapping => %w(balance amount) end Instead, you can do something like this: def balance @balance ||= Money.new(value, currency) end def balance=(balance) self[:value] = balance.value self[:currency] = balance.currency @balance = balance end Since that's fairly easy code to write, and doesn't need anything extra from the framework, if you use composed_of today, you'll have to add accessors/mutators like that. Closes #1436 Closes #2084 Closes #3807 | ||||
* | Address ORA-00911 errors because of the heading underscore. | Yasuo Honda | 2012-06-11 | 1 | -1/+1 |
| | |||||
* | Fix that #exists? raises ThrowResult when called with an empty limited | Ben Woosley | 2012-06-10 | 1 | -1/+6 |
| | | | | | | | | | reflection. ActiveRecord::FinderMethods#construct_limited_ids_condition will raise ThrowResult if the limited reflection comes back empty. The other callers of #construct_limited_ids_condition handle this exception (more specifically, the callers of construct_relation_for*), but #exists? didn't until now. | ||||
* | Add test to column alias in `exists?` SQL. | Rafael Mendonça França | 2012-06-10 | 1 | -0/+6 |
| | | | | | | | | This behavior was added in be4ecdcc87984e9421ff5d5c90d33f475e0fbc01. Closes #1139. Fixes #2553, #1141, #1623 and #2062. | ||||
* | stop `to_s`ing method names | Akira Matsuda | 2012-06-06 | 1 | -1/+1 |
| | | | | Module#methods are Symbols in Ruby >= 1.9 | ||||
* | 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 |
|/ |