Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Revert "Merge pull request #7983 from georgebrock/bug7950-squashed" | Carlos Antonio da Silva | 2013-01-15 | 1 | -2/+2 |
| | | | | | | | | | | | This reverts commit 88a296dccc401da143d90cad54b693ff06bf2b58, reversing changes made to 666a7e34f553cef4c8878362eafc79c7e3f310c3. Conflicts: activerecord/CHANGELOG.md Reason: this has been resulting in some hard to track bugs and is introducing a possible breackage in a stable version. | ||||
* | backport #8403, no intermediate AR objects when eager loading. | Yves Senn | 2012-12-04 | 1 | -2/+4 |
| | | | | | | | | | Closes #3313 Conflicts: activerecord/CHANGELOG.md activerecord/test/models/developer.rb | ||||
* | Merge pull request #7983 from georgebrock/bug7950-squashed | Carlos Antonio da Silva | 2012-11-16 | 1 | -2/+2 |
|\ | | | | | | | | | | | | | | | Backport 4bc2ae0 to fix #7950 Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/relation/calculations.rb | ||||
| * | use bind values for join columns | Aaron Patterson | 2012-11-10 | 1 | -2/+2 |
| | | | | | | | | | | | | | | | | | | | | This is a backport of 4bc2ae0da1dd812aee759f6d13ad428354cd0e13. It fixes bug #7950. Conflicts: activerecord/lib/active_record/relation/calculations.rb activerecord/lib/active_record/relation/finder_methods.rb | ||||
* | | Use nil? instead of blank? to check dynamic finder result | Nikita Afanasenko | 2012-11-13 | 1 | -1/+1 |
|/ | | | | | | | It's safe to use `nil?` instead of `blank?` because it's impossible to get an array on finder with bang; `all_by` finder matches against regex without bang: `when /^find_(all_|last_)?by_([_a-zA-Z]\w*)$/`. Fixes #7238 | ||||
* | Merge pull request #6698 from yahonda/address_ora_911_master | Rafael Mendonça França | 2012-06-11 | 1 | -1/+1 |
| | | | | Address ORA-00911 errors because of the heading underscore. | ||||
* | Merge pull request #6521 from Empact/throw-result | Rafael Mendonça França | 2012-06-10 | 1 | -0/+2 |
| | | | | | | Fix that #exists? can blow up with ThrowResult exception Conflicts: activerecord/lib/active_record/relation/finder_methods.rb | ||||
* | Minimal change to query generation of exists? that makes SQLServer and ↵ | iaddict | 2012-06-10 | 1 | -1/+1 |
| | | | | | | | others happy that do not work without a column alias. Conflicts: activerecord/lib/active_record/relation/finder_methods.rb | ||||
* | Return false for exists? with new records - fixes #6199. | Andrew White | 2012-05-10 | 1 | -2/+1 |
| | | | | (cherry picked from commit fa21b73ebb8339ad388f149c817c433b6254d490) | ||||
* | Add dynamic find_or_create_by_{attribute}! method. | Andrew White | 2012-03-12 | 1 | -1/+1 |
| | | | | | | | | | (cherry picked from commit 5282485d310d1a6ffcf55e4e7f56ab234e16880d) Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/dynamic_finder_match.rb | ||||
* | prepared statements can be disabled | Aaron Patterson | 2012-02-21 | 1 | -1/+1 |
| | |||||
* | Merge pull request #4282 from edgecase/order_after_reorder | Aaron Patterson | 2012-01-04 | 1 | -2/+2 |
| | | | | correctly handle order calls after a reorder | ||||
* | Merge pull request #4216 from edgecase/master_fix_reorder_with_limited_ids | Aaron Patterson | 2011-12-28 | 1 | -1/+1 |
| | | | | allow reorder to affect eager loading correctly | ||||
* | exclude ORDER BY clause when querying Relation#exists? | Akira Matsuda | 2011-11-09 | 1 | -1/+1 |
| | |||||
* | Merge pull request #2485 from akaspick/exists_fix | Jon Leighton | 2011-09-07 | 1 | -1/+3 |
|\ | | | | | 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 | -1/+3 |
| | | | | | | | | param) | ||||
* | | Use LIMIT sql word in last when it's possible | Damien Mathieu | 2011-09-05 | 1 | -1/+5 |
| | | |||||
* | | use LIMIT SQL word in first - Closes #2783 | Damien Mathieu | 2011-09-05 | 1 | -1/+1 |
|/ | |||||
* | Make it the responsibility of the connection to hold onto an ARel visitor ↵ | Jon Leighton | 2011-08-08 | 1 | -3/+3 |
| | | | | for generating SQL. This improves the code architecture generally, and solves some problems with marshalling. Adapter authors please take note: you now need to define an Adapter.visitor_for method, but it degrades gracefully with a deprecation warning for now. | ||||
* | avoid Symbol#to_proc | Vijay Dev | 2011-07-20 | 1 | -1/+1 |
| | |||||
* | ActiveRecord: Fix eager loading so that giving a blank order clause ↵ | Elliot Winkler | 2011-07-18 | 1 | -1/+1 |
| | | | | generates valid SQL | ||||
* | Merge pull request #1823 from gnarg/master | Santiago Pastorino | 2011-07-10 | 1 | -2/+2 |
|\ | | | | | Log instrumentation name for exists? queries | ||||
| * | Log instrumentation name for exists? queries | Jon Guymon | 2011-06-22 | 1 | -2/+2 |
| | | |||||
* | | Merge pull request #1273 from jeremyf/feature-association-proxy-send | Santiago Pastorino | 2011-07-06 | 1 | -0/+1 |
|\ \ | |/ |/| | Addresses an inconsistency in the ActiveRecord::Base.method_missing handl | ||||
| * | Addresses an inconsistency in the ActiveRecord::Base.method_missing handling ↵ | Jeremy Friesen | 2011-05-24 | 1 | -0/+1 |
| | | | | | | | | of dynamic finder methods and the passing of the &block parameter for :find_by_attributes. | ||||
* | | Merge branch 'master' of git://github.com/lifo/docrails | Xavier Noria | 2011-05-25 | 1 | -1/+1 |
|\ \ | |/ |/| | | | | | | | Conflicts: actionmailer/lib/action_mailer/base.rb activesupport/lib/active_support/core_ext/kernel/requires.rb | ||||
| * | Remove extra white spaces on ActiveRecord docs. | Sebastian Martinez | 2011-05-23 | 1 | -1/+1 |
| | | |||||
* | | Add support for passing mass assignment roles to dynamic finders. Closes #1170. | Andrew White | 2011-05-21 | 1 | -2/+2 |
| | | |||||
* | | Syntax cleanup: for in => each | Guillermo Iguaran | 2011-05-19 | 1 | -1/+1 |
|/ | |||||
* | Fix for #371 | Nick Howard | 2011-05-08 | 1 | -1/+6 |
| | | | | | | | | | | | | 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. | ||||
* | deprecated the use of the guard_protected_attributes argument with ↵ | Josh Kalderimis | 2011-04-25 | 1 | -2/+2 |
| | | | | attributes= in AR in favor of assign_attributes(attrs, :without_protection => true) | ||||
* | stop using distinct on for the unique id queries. [#6450 state:resolved] | Aaron Patterson | 2011-04-21 | 1 | -0/+2 |
| | |||||
* | use index based substitution for bind parameters | Aaron Patterson | 2011-04-13 | 1 | -1/+1 |
| | |||||
* | stop using deprecated methods in arel | Aaron Patterson | 2011-04-11 | 1 | -2/+2 |
| | |||||
* | Use IM when trying to load records using ID. | Emilio Tagua | 2011-04-04 | 1 | -0/+9 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Change exists? so that it doesn't instantiate records [#6127 state:resolved] | Andrew White | 2011-03-29 | 1 | -4/+10 |
| | |||||
* | removes unnecessary selfs, and mentions that first! and last! take no ↵ | Xavier Noria | 2011-03-26 | 1 | -4/+6 |
| | | | | arguments in their API docs | ||||
* | No arguments for first! and last! | Pratik Naik | 2011-03-25 | 1 | -4/+4 |
| | |||||
* | comment typo fix | Josh Susser | 2011-03-25 | 1 | -2/+2 |
| | |||||
* | add #first! and #last! to models & relations | Josh Susser | 2011-03-24 | 1 | -0/+10 |
| | |||||
* | Move JoinDependency and friends from ↵ | Jon Leighton | 2011-02-28 | 1 | -2/+2 |
| | | | | ActiveRecord::Associations::ClassMethods to just ActiveRecord::Associations | ||||
* | keep options titles consistent to "Options" | Gabriel Horner | 2011-02-03 | 1 | -1/+1 |
| | |||||
* | use select_all because not all database adapters support bind values | Aaron Patterson | 2011-01-08 | 1 | -1/+1 |
| | |||||
* | stop creating intermediate AR objects, just construct AR objects from a list ↵ | Aaron Patterson | 2011-01-07 | 1 | -1/+2 |
| | | | | of hashes | ||||
* | Explicitly select * from has_and_belongs_to_many association tables, ↵ | Raimonds Simanovskis | 2011-01-04 | 1 | -1/+1 |
| | | | | | simplify exists? query Previous version (after commit 3103296a61709e808aa89c3d37cf22bcdbc5a675) was generating wrong SQL for Oracle when calling exists? method on HABTM association. | ||||
* | ActiveRecord::Relation#primary_key should return a string, just like ↵ | Jon Leighton | 2011-01-03 | 1 | -9/+9 |
| | | | | ActiveRecord::Base.primary_key does. | ||||
* | taking advantage of the JoinSource node in the SQL AST | Aaron Patterson | 2010-12-16 | 1 | -1/+1 |
| | |||||
* | passing the ast to JoinDependency | Aaron Patterson | 2010-12-07 | 1 | -1/+1 |
| | |||||
* | use the columns hash for primary key lookup | Aaron Patterson | 2010-12-03 | 1 | -1/+1 |
| | |||||
* | reduce method calls on arel | Aaron Patterson | 2010-11-30 | 1 | -1/+1 |
| |