aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation
Commit message (Collapse)AuthorAgeFilesLines
* stop calling to_sym when building arel nodes [CVE-2013-1854]Aaron Patterson2013-03-151-1/+1
|
* Revert "Merge pull request #9208 from dylanahsmith/3-2-mysql-quote-numeric"Steve Klabnik2013-02-261-4/+0
| | | | This reverts commit 921a296a3390192a71abeec6d9a035cc6d1865c8.
* fixing call to columns hash. run the damn tests when you backport!Aaron Patterson2013-02-091-1/+1
|
* active_record: Quote numeric values compared to string columns.Dylan Smith2013-02-071-0/+4
|
* Merge pull request #9078 from senny/6865_ar_count_with_uniqRafael Mendonça França2013-02-021-1/+2
| | | | | | `#count` in conjunction with `#uniq` performs distinct count. Conflicts: activerecord/CHANGELOG.md
* Fix pluck when columns/tables are reserved words.Ian Lesperance2013-01-231-1/+1
| | | | | | | | | Backport #7536 to fix #8968. Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/relation/calculations.rb
* Revert "Merge pull request #7983 from georgebrock/bug7950-squashed"Carlos Antonio da Silva2013-01-153-10/+6
| | | | | | | | | | | 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.
* Merge branch '3-2-sec' into 3-2-secmergeAaron Patterson2013-01-081-1/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | * 3-2-sec: bumping version CVE-2013-0156: Safe XML params parsing. Doesn't allow symbols or yaml. * Strip nils from collections on JSON and XML posts. [CVE-2013-0155] * dealing with empty hashes. Thanks Damien Mathieu Avoid Rack security warning no secret provided Conflicts: actionpack/CHANGELOG.md activerecord/CHANGELOG.md activesupport/CHANGELOG.md
| * * Strip nils from collections on JSON and XML posts. [CVE-2013-0155] * ↵Aaron Patterson2013-01-081-1/+6
| | | | | | | | dealing with empty hashes. Thanks Damien Mathieu
* | backport #8403, no intermediate AR objects when eager loading.Yves Senn2012-12-041-2/+4
| | | | | | | | | | | | | | | | | | Closes #3313 Conflicts: activerecord/CHANGELOG.md activerecord/test/models/developer.rb
* | Merge pull request #4942 from bogdan/pluck_joinsJosé Valim2012-12-031-1/+6
| | | | | | | | | | | | | | | | AR::Relation#pluck: improve to work with joins Conflicts: activerecord/lib/active_record/relation/calculations.rb activerecord/test/cases/calculations_test.rb
* | Merge pull request #7983 from georgebrock/bug7950-squashedCarlos Antonio da Silva2012-11-163-6/+10
|\ \ | | | | | | | | | | | | | | | | | | | | | Backport 4bc2ae0 to fix #7950 Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/relation/calculations.rb
| * | use bind values for join columnsAaron Patterson2012-11-103-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge pull request #8209 from senny/backport_8176Rafael Mendonça França2012-11-131-1/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | backport #8176, `#pluck` can be used on a relation with `select` clause. Conflicts: activerecord/CHANGELOG.md
| * | | backport #8176, `#pluck` can be used on a relation with `select` clause.Yves Senn2012-11-131-1/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/relation/calculations.rb activerecord/test/cases/calculations_test.rb
* / / Use nil? instead of blank? to check dynamic finder resultNikita Afanasenko2012-11-131-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
* | Fix find_in_batches against string IDs when start option is not specified.Alexis Bernard2012-11-081-2/+2
| | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/relation/batches.rb
* | start could be a stringSantiago Pastorino2012-11-081-1/+1
|/ | | | | | | | | | Related to 761bc751d31c22e2c2fdae2b4cdd435b68b6d783 and eb876c4d07130f15be2cac7be968cc393f959c62 Conflicts: activerecord/lib/active_record/relation/batches.rb activerecord/test/cases/batches_test.rb
* 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