- 04 9月, 2014 7 次提交
-
-
由 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.
-
由 eileencodes 提交于
We convert all other scopes to lambda's so it makes sense that we should always returns a lambda on a ThroughReflection as well. This eliminates the need to check if the scope is a Relation.
-
由 eileencodes 提交于
Remove chain from parameters, it's no longer needed since chain and i are being passed via next_reflection Change name of `reflection` to `owner_reflection` because of shadow variable warning. The last reflection will always be the owner.
-
由 Godfrey Chan 提交于
Added a few more methods on Module/Class to the dangerous class methods blacklist. (Technically, allocate and new are already protected currently because we happen to redefine them in the current implantation.) Closes #16792
-
由 Yves Senn 提交于
Warning looked like this: ``` /Users/senny/Projects/rails/activerecord/lib/active_record/associations/association_scope.rb:142: warning: shadowing outer local variable - reflection ```
-
由 Aaron Patterson 提交于
-
由 Yves Senn 提交于
[Joshua Cody & Yves Senn] Closes #16757. Prior to this patch schema loading rake tasks had the potential to leak a connection to a different database. This had side-effects when rake tasks operating on the current connection (like `db:seed`) were chained.
-
- 03 9月, 2014 3 次提交
-
-
由 Akira Matsuda 提交于
-
由 Ryuta Kamizono 提交于
TableDefinition#column is not called from `add_column`. Use TableDefinition#new_column_definition for column option handling.
-
由 Yasuo Honda 提交于
Since 'drop table if exists' statement does not always work with some databases such as Oracle.
-
- 02 9月, 2014 4 次提交
-
-
由 Arthur Neves 提交于
Method .strip_heredoc is defined in active_support/core_ext/string/strip.rb so we need to require it. [fixes #16677]
-
由 Matthew Draper 提交于
We're seeing too many failures to believe otherwise. This reverts commits bc116a55, cbde413d, bf0a6793, and 2440933f.
-
由 Jeremy Kemper 提交于
-
由 eileencodes 提交于
This breaks the two branches of the `if reflection.last` and `else` to clearer see where the two methods can be refactored. Eventually we hope to remove the need for these separated methods altogether. Move the first branch outside the loop This code doesn't need to be in the loop because it it always affects the last chain. `get_bind_values` and `add_constraints` must match in this context because `get_bind_values` is the caching of `add_constraints` Use each_cons to remove need for `chain[i + 1]` The `chain[i + 1]` is confusing because it's not immediately obvious what it's trying to achieve. The use of `each_cons` makes it clear we need to get the `next_reflection`.
-
- 01 9月, 2014 2 次提交
-
-
由 Akira Matsuda 提交于
-
由 Akira Matsuda 提交于
-
- 31 8月, 2014 1 次提交
-
-
由 Jeremy Kemper 提交于
Sets the connection collation to the database collation configured in database.yml. Otherwise, `SET NAMES utf8mb4` will use the default collation for that charset (utf8mb4_general_ci) when you may have chosen a different collation, like utf8mb4_unicode_ci. This only applies to literal string comparisons, not column values, so it is unlikely to affect you.
-
- 30 8月, 2014 4 次提交
-
-
由 Akira Matsuda 提交于
so this assertion causes random test fail
-
由 Robin Dupret 提交于
When we are loading a component and we want to know its version, we are actually not speaking about the constant but the library itself. [ci skip] [Godfrey Chan & Xavier Noria]
-
由 Akira Matsuda 提交于
-
由 Akira Matsuda 提交于
This fixes random test failure in migrator_test.rb
-
- 29 8月, 2014 11 次提交
-
-
Asserting that the message contains "QUERY PLAN" is enough for the adapter's test. The plan may vary according to number of tuples etc. but that's out of our concern.
-
由 Yves Senn 提交于
This reverts commit 16fe1983, reversing changes made to 4c81c8ce. The call to `Model.reset_column_information` was to express the intent of the test. `reset_column_information` itself can trigger SQL queries because it checks for a tables existance. Let's move it outside of the block. /cc @sgrif
-
由 yuuji.yaginuma 提交于
-
由 Akira Matsuda 提交于
-
由 Akira Matsuda 提交于
-
由 Akira Matsuda 提交于
-
由 Akira Matsuda 提交于
-
由 Akira Matsuda 提交于
-
由 Akira Matsuda 提交于
-
由 Akira Matsuda 提交于
-
由 Godfrey Chan 提交于
Using heredoc would enforce line wrapping to whatever column width we decided to use in the code, making it difficult for the users to read on some consoles. This does make the source code read slightly worse and a bit more error-prone, but this seems like a fair price to pay since the primary purpose for these messages are for the users to read and the code will not stick around for too long.
-
- 28 8月, 2014 8 次提交
-
-
由 Akira Matsuda 提交于
-
由 Yves Senn 提交于
[ci skip]
-
由 Akira Matsuda 提交于
This test would fail when executed after any test that calls fixtures(:binaries)
-
由 Akira Matsuda 提交于
-
由 Akira Matsuda 提交于
There exists some other test files that load :minivans fixtures but don't load :speedometers. Loading :speedometers here prevents the following error when this test was run after such test: CalculationsTest#test_should_group_by_association_with_non_numeric_foreign_key: ActiveRecord::RecordNotFound: Couldn't find all Speedometers with 'speedometer_id': (ABC, s1) (found 1 results, but was looking for 2)
-
由 Akira Matsuda 提交于
Dir.glob result must be already sorted anyway
-
由 Akira Matsuda 提交于
-
由 Akira Matsuda 提交于
-