- 04 9月, 2014 1 次提交
-
-
由 Sammy Larbi 提交于
Eagerly loaded collection and singular associations are ignored by the StatementCache, which causes errors when the queries they generate reference columns that were not eagerly loaded. This commit skips the creation of the StatementCache as a fix for these scenarios.
-
- 28 8月, 2014 1 次提交
-
-
由 Akira Matsuda 提交于
-
- 20 8月, 2014 1 次提交
-
-
由 Agis- 提交于
with dynamic conditions. Fixes #16128 This bug was introduced in https://github.com/rails/rails/commit/c35e438620f2d56562251571377995359546393d so it's present from 4.1.2-rc1 and after. https://github.com/rails/rails/commit/c35e438620f2d56562251571377995359546393d merges any relation scopes passed as proc objects to the relation, but does *not* take into account the arity of the lambda. To reproduce: https://gist.github.com/Agis-/5f1f0d664d2cd08dfb9b
-
- 19 8月, 2014 1 次提交
-
-
由 Kassio Borges 提交于
Fixes #15821.
-
- 14 7月, 2014 1 次提交
-
-
由 Yasuo Honda 提交于
by using shorter attribute names.
-
- 26 6月, 2014 2 次提交
-
-
由 Sean Griffin 提交于
Making this change revealed several subtle bugs related to models with no primary key, and anonymous classes. These have been fixed as well, with regression tests added.
-
由 Sean Griffin 提交于
Reliant on https://github.com/rails/rails/pull/15747 but pulled to a separate PR to reduce noise. `has_many :through` associations have the undocumented behavior of automatically detecting counter caches. However, the way in which it does so is inconsistent with counter caches everywhere else, and doesn't actually work consistently. As with normal `has_many` associations, the user should specify the counter cache on the `belongs_to`, if they'd like it updated.
-
- 20 6月, 2014 1 次提交
-
-
由 Rafael Mendonça França 提交于
Now the following case will work fine class Tag < ActiveRecord::Base end class Publisher::Article < ActiveRecord::Base has_and_belongs_to_many :tags end Fixes #15761
-
- 18 6月, 2014 1 次提交
-
-
由 Nat Budin 提交于
-
- 11 6月, 2014 1 次提交
-
-
由 Andrew S. Brown 提交于
use name specified by 'as' for automatic inverse association to avoid reflecting on wrong association
-
- 04 6月, 2014 1 次提交
-
-
由 Lauro Caetano 提交于
than existing column. Fixes #15480.
-
- 21 5月, 2014 3 次提交
-
-
由 Rafael Mendonça França 提交于
This reverts commit 9a1abedc, reversing changes made to c72d6c91. Conflicts: activerecord/CHANGELOG.md activerecord/test/models/comment.rb This change break integration with activerecord-deprecated_finders so I'm reverting until we find a way to make it work with this gem.
-
由 Yves Senn 提交于
-
由 Lauro Caetano 提交于
The foreign_key could be `String` and just doing `owners_map[owner_key]` could return `nil`. To prevent this bug, we should `to_s` both keys if their types are different. Fixes #14734.
-
- 19 5月, 2014 1 次提交
-
-
由 Yves Senn 提交于
-
- 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.
-
- 13 5月, 2014 1 次提交
-
-
由 Kassio Borges 提交于
Thank's for @laurocaetano for the help with tests.
😃 Fixes #14709
-
- 10 5月, 2014 2 次提交
-
-
由 Arthur Neves 提交于
-
由 Yves Senn 提交于
-
- 08 5月, 2014 1 次提交
-
-
由 Fred Wu 提交于
HABTM should fall back to using the normal CollectionAssociation's size calculation if the collection is not cached or loaded. This addresses both #14913 and #14914 for master.
-
- 06 5月, 2014 1 次提交
-
-
由 Jenner LaFave 提交于
This makes table_name_suffix work the same as table_name_prefix when using namespaced models. Pretty much the same as 67d1cec4.
-
- 05 5月, 2014 2 次提交
-
-
由 Bogdan Gusiev 提交于
This is a regression 4.0 -> 4.1 fix. In 4.1.0 Relation#join is delegated to Arel#SelectManager. In 4.0 series it is delegated to Array#join This patch puts back the behaviour of 4.0
-
由 Carlos Antonio da Silva 提交于
-
- 01 5月, 2014 1 次提交
-
-
由 Eric Chahin 提交于
associations were not being saved. Fixes #13854. [Eric Chahin, Aaron Nelson, & Kevin Casey]
-
- 24 4月, 2014 1 次提交
-
-
由 Jefferson Lai 提交于
Changed the call to a scope block to be evaluated with instance_eval. The result is that ScopeRegistry can use the actual class instead of base_class when caching scopes so queries made by classes with a common ancestor won't leak scopes.
-
- 15 4月, 2014 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 12 4月, 2014 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 10 4月, 2014 1 次提交
-
-
由 Lauro Caetano 提交于
values. With the changes introduced by 16b70fdd it was expecting the value to be a Symbol, while it could be also a String value.
-
- 05 4月, 2014 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 03 4月, 2014 3 次提交
-
-
由 Lauro Caetano 提交于
It was causing error when using `with_options` passing a lambda as its last argument. class User < ActiveRecord::Base with_options dependent: :destroy do |assoc| assoc.has_many :profiles, -> { where(active: true) } end end It was happening because the `option_merger` was taking the last argument and checking if it was a Hash. This breaks the HasMany usage, because its last argument can be a Hash or a Proc. As the behavior described in this test: https://github.com/rails/rails/blob/master/activesupport/test/option_merger_test.rb#L69 the method will only accept the lambda, this way it will keep the expected behavior. See 9eaa0a34
-
由 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 3月, 2014 1 次提交
-
-
由 chrisfinne 提交于
custom primary_key that didn't save due to validation error
-
- 15 3月, 2014 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
Fixes #14383.
-
- 23 2月, 2014 1 次提交
-
-
由 Jon Leighton 提交于
See #13875
-
- 22 2月, 2014 1 次提交
-
-
由 Matt Jones 提交于
This allows the default scope to be built using the current table alias. Resolves #12770
-
- 21 2月, 2014 1 次提交
-
-
由 Aaron Patterson 提交于
This reverts commit 5e3d466d.
-
- 09 2月, 2014 2 次提交
-
-
由 Lauro Caetano 提交于
It should not save the parent record when the nested attributes are invalid. Test case to cover #8194.
-
由 Kevin Casey 提交于
-
- 05 2月, 2014 1 次提交
-