| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
that #exists? and others can produce invalid SQL: "SELECT DISTINCT DISTINCT"
The combination of a :uniq => true association and the #distinct call
in #construct_limited_ids_condition combine to create invalid SQL, because
we're explicitly selecting DISTINCT, and also sending #distinct on to AREL,
via the relation#distinct_value.
Where #6792 was the forever fix, this is the minimal fix. Instead of
properly indicating the distinctness of the query through #uniq_value alone,
we use a literal select statement and set #uniq_value to always be falsey
|
|
|
|
|
|
| |
This is a backport of #10164, already merged into
master. The issue is described in lengthy detail
in issues #3002 and #5494.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See #9777 for details.
Previously pluck is not returning what we wanted to
Added a test also to make sure it's working fine.
This will also fix the build for 1.8.7 as we
were doing some sort on hash.
Thanks @pixeltrix for helping me out.
Thanks @linduxed for pairing with me.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 724020278480855bddfe749c91f1074d4f50f3c6, reversing
changes made to e4e2bcce75b85fb8c1c49509a17bd5dfe6034c32.
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/relation/calculations.rb
activerecord/test/cases/calculations_test.rb
Reason: This caused a regression since it changed the behavior in a
stable release.
Fixes #9777
|
|\
| |
| | |
Fixes Issue #7490: Chained scopes will preload properly
|
| | |
|
|/ |
|
|
|
|
| |
This reverts commit 921a296a3390192a71abeec6d9a035cc6d1865c8.
|
| |
|
| |
|
|
|
|
|
|
| |
`#count` in conjunction with `#uniq` performs distinct count.
Conflicts:
activerecord/CHANGELOG.md
|
|
|
|
|
|
|
|
|
| |
Backport #7536 to fix #8968.
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/relation/calculations.rb
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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
|
| |
| |
| |
| | |
dealing with empty hashes. Thanks Damien Mathieu
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Closes #3313
Conflicts:
activerecord/CHANGELOG.md
activerecord/test/models/developer.rb
|
| |
| |
| |
| |
| |
| |
| |
| | |
AR::Relation#pluck: improve to work with joins
Conflicts:
activerecord/lib/active_record/relation/calculations.rb
activerecord/test/cases/calculations_test.rb
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Backport 4bc2ae0 to fix #7950
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/relation/calculations.rb
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
backport #8176, `#pluck` can be used on a relation with `select` clause.
Conflicts:
activerecord/CHANGELOG.md
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/relation/calculations.rb
activerecord/test/cases/calculations_test.rb
|
|/ /
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/relation/batches.rb
|
|/
|
|
|
|
|
|
|
|
| |
Related to 761bc751d31c22e2c2fdae2b4cdd435b68b6d783 and
eb876c4d07130f15be2cac7be968cc393f959c62
Conflicts:
activerecord/lib/active_record/relation/batches.rb
activerecord/test/cases/batches_test.rb
|
|
|
|
|
|
|
|
| |
Fix build issue with postgresql.
Conflicts:
activerecord/lib/active_record/relation/calculations.rb
activerecord/test/cases/calculations_test.rb
|
|
|
|
|
|
| |
Stop assuming strings for grouped calculations
Conflicts:
activerecord/lib/active_record/relation/calculations.rb
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Address ORA-00911 errors because of the heading underscore.
|
|
|
|
|
|
| |
Fix that #exists? can blow up with ThrowResult exception
Conflicts:
activerecord/lib/active_record/relation/finder_methods.rb
|
|
|
|
|
|
|
| |
others happy that do not work without a column alias.
Conflicts:
activerecord/lib/active_record/relation/finder_methods.rb
|
|
|
|
| |
Fix #6635. We should call Scoping methods, before calling Array methods.
|
|
|
|
|
|
| |
Thanks to Ben Murphy for reporting this
CVE-2012-2661
|
|
|
|
| |
(cherry picked from commit fa21b73ebb8339ad388f149c817c433b6254d490)
|
|
|
|
|
|
| |
add test to show offset query_methods on mysql & mysql2
change test to cover public API
|
|
|
|
|
|
|
|
|
| |
(cherry picked from commit 5282485d310d1a6ffcf55e4e7f56ab234e16880d)
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/dynamic_finder_match.rb
|
| |
|
|
|
|
|
| |
Didn't cherry pick the master commit because this one already had some
of the fixes made in master.
|
| |
|
|
|
|
| |
correctly handle order calls after a reorder
|
|
|
|
| |
allow reorder to affect eager loading correctly
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
method missing calls for rofscale.
|
| |
|
| |
|