aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation
Commit message (Collapse)AuthorAgeFilesLines
* Ensure Arel columns are typecasted properly when grouping with calculationCarlos Antonio da Silva2012-06-251-3/+3
| | | | | | | | Fix build issue with postgresql. Conflicts: activerecord/lib/active_record/relation/calculations.rb activerecord/test/cases/calculations_test.rb
* Merge pull request #6842 from ernie/handle-non-strings-in-grouped-calculationsRafael Mendonça França2012-06-241-6/+17
| | | | | | Stop assuming strings for grouped calculations Conflicts: activerecord/lib/active_record/relation/calculations.rb
* Additional fix for CVE-2012-2661Ernie Miller2012-06-111-3/+3
| | | | | | | | While the patched PredicateBuilder in 3.1.5 prevents a user from specifying a table name using the `table.column` format, it doesn't protect against the nesting of hashes changing the table context in the next call to build_from_hash. This fix covers this case as well.
* Merge pull request #6698 from yahonda/address_ora_911_masterRafael Mendonça França2012-06-111-1/+1
| | | | Address ORA-00911 errors because of the heading underscore.
* Merge pull request #6521 from Empact/throw-resultRafael Mendonça França2012-06-101-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 ↵iaddict2012-06-101-1/+1
| | | | | | | others happy that do not work without a column alias. Conflicts: activerecord/lib/active_record/relation/finder_methods.rb
* Merge pull request #6695 from kennyj/fix_6635Rafael Mendonça França2012-06-101-5/+5
| | | | Fix #6635. We should call Scoping methods, before calling Array methods.
* predicate builder should not recurse for determining where columns.Aaron Patterson2012-05-301-3/+3
| | | | | | Thanks to Ben Murphy for reporting this CVE-2012-2661
* Return false for exists? with new records - fixes #6199.Andrew White2012-05-101-2/+1
| | | | (cherry picked from commit fa21b73ebb8339ad388f149c817c433b6254d490)
* fix activerecord query_method regression with offset into FixnumDenis Jean2012-03-131-1/+1
| | | | | | add test to show offset query_methods on mysql & mysql2 change test to cover public API
* Add dynamic find_or_create_by_{attribute}! method.Andrew White2012-03-121-1/+1
| | | | | | | | | (cherry picked from commit 5282485d310d1a6ffcf55e4e7f56ab234e16880d) Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/dynamic_finder_match.rb
* prepared statements can be disabledAaron Patterson2012-02-211-1/+1
|
* select doesn't take multiple arguments - fixes #4539 [ci skip]Vijay Dev2012-01-191-2/+2
| | | | | Didn't cherry pick the master commit because this one already had some of the fixes made in master.
* add documentation explaining reorder behaviorMatt Jones2012-01-111-0/+10
|
* Merge pull request #4282 from edgecase/order_after_reorderAaron Patterson2012-01-043-7/+17
| | | | correctly handle order calls after a reorder
* Merge pull request #4216 from edgecase/master_fix_reorder_with_limited_idsAaron Patterson2011-12-281-1/+1
| | | | allow reorder to affect eager loading correctly
* Remove empty line.Marcos Tapajós2011-12-281-1/+0
|
* Closes #4208Marcos Tapajós2011-12-271-2/+3
|
* Make ActiveRecord::Relation#pluck work with serialized attributesJon Leighton2011-12-221-4/+4
|
* Do not raise an exception if an invalid route was generated automatically.José Valim2011-12-161-1/+1
|
* Set up delegations also for to_a and arel branches.José Valim2011-12-151-2/+9
|
* Move delegation reponsibilities of Relation to a module. Also precompile ↵José Valim2011-12-151-0/+42
| | | | method missing calls for rofscale.
* ActiveRecord::Relation#pluck methodBogdan Gusiev2011-11-301-0/+17
|
* pushing caching and visitors down to the connectionAaron Patterson2011-11-191-1/+1
|
* Fixes issue #3483, regarding using a mixture of ranges and discrete values ↵Ryan Naughton2011-11-141-6/+8
| | | | in find conditions. Paired with Joey Schoblaska.
* exclude ORDER BY clause when querying Relation#exists?Akira Matsuda2011-11-091-1/+1
|
* Add ActiveRecord::Relation#uniq for toggling DISTINCT in the SQL queryJon Leighton2011-11-051-6/+24
|
* copy edits 908f2616Vijay Dev2011-09-201-4/+4
|
* Document ActiveRecord::QueryMethods#selectRyan Bigg2011-09-171-0/+29
|
* minor editVijay Dev2011-09-141-1/+1
|
* Add documentation for the extending method in ActiveRecord:QueryMethodsRyan Bigg2011-09-141-0/+36
|
* Merge pull request #2485 from akaspick/exists_fixJon Leighton2011-09-071-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 Kaspick2011-08-101-1/+3
| | | | | | | | param)
* | Use LIMIT sql word in last when it's possibleDamien Mathieu2011-09-051-1/+5
| |
* | use LIMIT SQL word in first - Closes #2783Damien Mathieu2011-09-051-1/+1
| |
* | We need to recorder here. Need to drop the order from default scope.Arun Agrawal2011-09-051-1/+1
| | | | | | Fixes #2832
* | Revert "Fixes bug in ActiveRecord::QueryMethods, #1697"Jon Leighton2011-09-041-2/+4
| | | | | | | | | | | | This reverts commit 0df27c98d982ec87d2fb48cfda82694eb267993e. Reverted due to failing test, see #2845.
* | Fixes bug in ActiveRecord::QueryMethods, #1697Joshua Wehner2011-08-311-4/+2
| | | | | | Replace split on comma with a regexp that will reverse all ASC/DESC specifically
* | The join_nodes must be passed to the JoinDependency initializer and ↵Jon Leighton2011-08-291-7/+2
| | | | | | | | therefore counted by the alias tracker. This is because the association_joins are aliased on initialization and then the tables are cached, so it is no use to alias the join_nodes later. Fixes #2556.
* | Fix PredicateBuilder clobbering select_values in subquery.Ernie Miller2011-08-201-1/+1
| |
* | Fix assumption of primary key name in PredicateBuilder subquery.Ernie Miller2011-08-201-1/+1
|/
* Make it the responsibility of the connection to hold onto an ARel visitor ↵Jon Leighton2011-08-082-5/+5
| | | | 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.
* Revert "Merge pull request #2309 from smasry/master"Jon Leighton2011-07-281-1/+1
| | | | | | | This reverts commit 9d396ee8195e31f646e0b89158ed96f4db4ab38f, reversing changes made to fa2bfd832c1d1e997d93c2269a485cc74782c86d. Reason: the change broke the build.
* Reverse order fix when using function for ActiveRecord::QueryMethods Fixes #1697Samer Masry2011-07-271-1/+1
|
* Fixed failing query when performing calculation with having based on select.Dmitriy Kiriyenko2011-07-271-0/+1
|
* Revert "allow select to have multiple arguments"Piotr Sarnacki2011-07-261-6/+3
| | | | | | | This reverts commit 04cc446d178653d362510e79a22db5300d463161. I reverted it because apparently we want to use: select([:a, :b]) instead of select(:a, :b), but there was no tests for that form.
* allow select to have multiple argumentsSławosz Sławiński2011-07-261-3/+6
|
* Ordering with extra spaces was raising a SQL exceptionFranck Verrot2011-07-241-0/+1
|
* avoid Symbol#to_procVijay Dev2011-07-201-1/+1
|
* ActiveRecord: Fix eager loading so that giving a blank order clause ↵Elliot Winkler2011-07-181-1/+1
| | | | generates valid SQL