- 15 5月, 2014 1 次提交
-
-
由 Nat Budin 提交于
ActiveRecord::Relation::Merger's filter_binds method does not filter out bind variables when one of the attribute nodes has a string name, but the other has a symbol name, even when those names are actually equal. This can result in there being more bind variables than placeholders in the generated SQL. This is particularly an issue for PostgreSQL, where this is treated as an error. This patch changes the filter_binds method to make it convert both attribute names to strings before comparing.
-
- 05 5月, 2014 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
- 12 4月, 2014 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 03 4月, 2014 2 次提交
-
-
由 Jan Habermann 提交于
-
由 Jefferson Lai 提交于
CollectionProxy should be able to reuse the behavior (methods) of its parent class, but with its own state. This change allows CollectionProxy to use the arel object corresponding to its association's scope.
-
- 28 10月, 2013 1 次提交
-
-
由 Paul Nikitochkin 提交于
Fixes: #12242, #9517, #10240
-
- 11 9月, 2013 1 次提交
-
-
由 Akira Matsuda 提交于
-
- 30 8月, 2013 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 18 8月, 2013 1 次提交
-
- 25 7月, 2013 1 次提交
-
-
由 Akira Matsuda 提交于
-
- 27 1月, 2013 1 次提交
-
-
由 Derek Kraan 提交于
because of an ambiguous column name. This happened if the association model had a default scope that referenced a third table, and the third table also referenced the original table (with an identical foreign_key). Mysql requires that ambiguous columns are deambiguated by using the full table.column syntax. Postgresql and Sqlite use a different syntax for updates altogether (and don't tolerate table.name syntax), so the fix requires always including the full table.column and discarding it later for Sqlite and Postgresql.
-
- 24 1月, 2013 3 次提交
-
-
由 Akira Matsuda 提交于
-
由 Akira Matsuda 提交于
-
由 Akira Matsuda 提交于
-
- 20 1月, 2013 1 次提交
-
-
由 Chris Geihsler 提交于
-
- 18 1月, 2013 1 次提交
-
-
由 Jon Leighton 提交于
Suggested by @dhh. It doesn't affect the generated SQL, so seems reasonable to continue to allow it as an association option.
-
- 22 9月, 2012 1 次提交
-
-
由 Santiago Pastorino 提交于
This reverts commit 761bc751. This commit wasn't fixing any issue just using the same table for different models with different primary keys.
-
- 16 9月, 2012 1 次提交
-
-
由 Toshiyuki Kawanishi 提交于
-
- 29 8月, 2012 1 次提交
-
-
由 Pratik Naik 提交于
-
- 28 7月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
It doesn't serve much purpose now that ActiveRecord::Base.all returns a Relation. The code is moved to active_record_deprecated_finders.
-
- 21 7月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
interpolation is no longer a thing separate from "normal" assoc conditions.
-
- 20 7月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
-
- 27 4月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
-
- 26 4月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
-
- 22 3月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
Don't use this: scope :red, where(color: 'red') default_scope where(color: 'red') Use this: scope :red, -> { where(color: 'red') } default_scope { where(color: 'red') } The former has numerous issues. It is a common newbie gotcha to do the following: scope :recent, where(published_at: Time.now - 2.weeks) Or a more subtle variant: scope :recent, -> { where(published_at: Time.now - 2.weeks) } scope :recent_red, recent.where(color: 'red') Eager scopes are also very complex to implement within Active Record, and there are still bugs. For example, the following does not do what you expect: scope :remove_conditions, except(:where) where(...).remove_conditions # => still has conditions
-
- 06 3月, 2012 1 次提交
-
-
由 Rafael Mendonça França 提交于
:strict
-
- 09 12月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 30 11月, 2011 1 次提交
-
-
由 Josh Susser 提交于
-
- 05 9月, 2011 1 次提交
-
-
由 Arun Agrawal 提交于
Fixes #2832
-
- 03 6月, 2011 1 次提交
-
-
由 Arun Agrawal 提交于
-
- 24 5月, 2011 1 次提交
-
-
由 Andrew White 提交于
-
- 19 4月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Un-deprecate using 'default_scope' as a macro, but if you are calling the macro multiple times that will give deprecation warnings, and in 3.2 we will simply overwrite the default scope when you call the macro multiple times.
-
- 18 4月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Revert "Deprecate defining scopes with a callable (lambda, proc, etc) via the scope class method. Just define a class method yourself instead." This reverts commit f0e198bf. Conflicts: activerecord/test/models/post.rb
-
- 13 4月, 2011 3 次提交
-
-
由 Aaron Patterson 提交于
-
由 Jon Leighton 提交于
Deprecate defining scopes with a callable (lambda, proc, etc) via the scope class method. Just define a class method yourself instead.
-
由 Jon Leighton 提交于
Deprecated support for passing hashes and relations to default_scope, in favour of defining a 'default_scope' class method in the model. See the CHANGELOG for more details.
-
- 17 3月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 06 3月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Add a test for STI on the through where the through is nested, and change the code which support this
-
- 18 2月, 2011 2 次提交
-
-
由 Jon Leighton 提交于
Allow building and then later saving has_many :through records, such that the join record is automatically saved too. This requires the :inverse_of option to be set on the source association in the join model. See the CHANGELOG for details. [#4329 state:resolved]
-
由 Jon Leighton 提交于
Ensure that association_ids uses the correct attribute where the association is a has_many :through with a :primary_key option on the source reflection. [#6376 state:resolved]
-