- 20 7月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
`binds` is an array of a query attribute since Active Record 5.0.
-
- 19 7月, 2016 6 次提交
-
-
由 alpaca-tc 提交于
-
由 Ryuta Kamizono 提交于
Because `connection#to_sql` does not mutate `binds`.
-
由 Ryuta Kamizono 提交于
-
由 suginoy 提交于
Changing the order of method chaining `merge` and other query method such as `joins` should produce the same result. ```ruby class Topic < ApplicationRecord scope :safe_chaininig, -> { joins(:comments).merge(Comment.newest) } scope :unsafe_chaininig, -> { merge(Comment.newest).joins(:comments) } #=> NoMethodError end ```
-
由 Ryuta Kamizono 提交于
Fixes #22398.
-
- 18 7月, 2016 5 次提交
-
-
由 Alex Kitchens 提交于
-
由 Xavier Noria 提交于
Albeit the previous existence of this method is not seen in the patch itself, the declaration mattr_accessor :error_on_ignored_order_or_limit, instance_writer: false was present before. It was removed recently in 210012f6.
-
由 Prathamesh Sonpatki 提交于
- It adds lot of warnings while running the tests. After https://github.com/rails/rails/commit/451437c6f57e66cc7586ec966e530493927098c7 it is not needed. - Added reader method with deprecation warning for backward compatibility.
-
由 bogdanvlviv 提交于
Refactored method `ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaStatements#default_sequence_name`
-
由 Ryuta Kamizono 提交于
-
- 17 7月, 2016 2 次提交
-
-
由 Ryuta Kamizono 提交于
Follow up to #20818. `retrieve_connection` is passed `spec_name` instead of `klass` since #24844.
-
由 Rafael Mendonça França 提交于
-
- 15 7月, 2016 1 次提交
-
-
由 Yamaguchi.Tomoki 提交于
-
- 14 7月, 2016 4 次提交
-
-
由 Grey Baker 提交于
Keeps schema migration inserts as a single commit, so we still get all of the benefits of https://github.com/rails/rails/commit/42dd2336b31a8d98776d039a2b9fd7f834156a78, but allows for easier git diff-ing. Fixes #25504.
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
We are setting a limit unconditionally just below, which overrides any existing one anyway.
-
由 Xavier Noria 提交于
-
- 13 7月, 2016 1 次提交
-
-
由 Jeremy Wadsack 提交于
loaded model classes have their connections wrapped in transactions. See #17776 In Rails 4 config.eager_load was changed to false in the test environment. This means that model classes that connect to alternate databases with establish_connection are not loaded at start up. If use_transactional_fixtures is enabled, transactions are wrapped around the connections that have been established only at the start of the test suite. So model classes loaded later don't have transactions causing data created in the alternate database not to be removed. This change resolves that by creating a new connection.active_record notification that gets fired whenever a connection is established. I then added a subscriber after we set up transactions in the test environment to listen for additional connections and wrap those in transactions as well.
-
- 12 7月, 2016 1 次提交
-
-
由 Santosh Wadghule 提交于
-
- 11 7月, 2016 1 次提交
-
-
由 Sean Griffin 提交于
When `group` is used in combination with any calculation method, the resulting hash uses the grouping expression as the key. Currently we're incorrectly always favoring the type reported by the query, instead of the type known by the class. This causes differing behavior depending on whether the adaptor actually gives proper types with the query or not. After this change, the behavior will be the same on all adaptors -- we see if we know the type from the class, fall back to the type from the query, and finally fall back to the identity type. Fixes #25595
-
- 09 7月, 2016 1 次提交
-
-
由 Rob Biedenharn 提交于
The documentation states that parameter values longer than 20 characters will be truncated by words, but the example shows that a parameter based on "David Heinemeier Hansson" (with id: 125) becomes "125-david" when "David Heinemeier".length == 16 so why so short? The answer lies in the use of the #truncate option omission: nil which seems to have been intended to mean "nothing", but which actually causes the default string "..." to be used. This causes #truncate to cleave words until the "..." can be added and still remain within the requested size of 20 characters. The better option is omission: '' (which is probably what was originally intended). Furthermore, since the use of #parameterize will remove non-alphanumeric characters, we can maximize the useful content of the output by calling parameterize first and then giving truncate a separator: /-/ rather than a space.
-
- 08 7月, 2016 1 次提交
-
-
由 Alex Kitchens 提交于
This includes minor grammar fixes throughout the file.
-
- 06 7月, 2016 5 次提交
-
-
由 Alex Kitchens 提交于
-
由 Matthew Draper 提交于
-
由 Matthew Draper 提交于
This way, we aren't racing other threads, so we don't need to re-check the conditional. And we no longer need to hold the lock while calling remove (which can choose to make a new connection while we wait).
-
由 Matthew Draper 提交于
A concurrent thread may have also detected it to be stale, and already released (or even reassigned) it by now. Fixes #25585
-
由 Matthew Draper 提交于
A thread can only release a connection if it owns it, or it's owned by a thread that has died.
-
- 04 7月, 2016 3 次提交
-
-
由 Kivanio Barbosa 提交于
-
由 Herman Hiddema 提交于
This nested if checked the same value as the containing case statement. Moved the code in the if/else into when/else in the containing case.
-
由 Ryuta Kamizono 提交于
-
- 03 7月, 2016 2 次提交
-
-
由 William Johnston 提交于
-
由 Ben Standefer 提交于
The current error message only indicates that a touch can fail because the record is new. In practice, we saw cases where touches were failing because the record had been destroyed. `persisted?` checks `new_record?` *and* `destroyed?`. It was confusing to get a message about a new record when in reality we were destroying records. I also included a helpful tip for users to consider using `persisted?`, `new_record?`, or `destroyed?` before touching.
-
- 02 7月, 2016 4 次提交
-
-
由 Ryuta Kamizono 提交于
Actually schema dumper/creation supports composite primary key (#21614). Therefore it should not show the warning about composite primary key in connection adapter. This change moves the warning to `AttributeMethods::PrimaryKey` and suppress the warning for habtm join table. Fixes #25388.
-
由 Ryuta Kamizono 提交于
-
由 Ryuta Kamizono 提交于
`create_table_info_cache` is used for sharing `create_table_info` both `table_options` and `foreign_keys`. But `foreign_keys` no longer uses `create_table_info_cache` by #25307. No need caching anymore.
-
由 Yasuo Honda 提交于
This reverts commit 407e0ab5.
-
- 01 7月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Because causing an extra query by `sql_for_insert` for guessing a primary key. https://github.com/rails/rails/blob/v5.0.0/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb#L121-L125
-
- 29 6月, 2016 1 次提交
-
-
由 Kevin McPhillips 提交于
Do not specal case inspecting associated arrays of over 10 elements, preventing infinite looping in some cases.
-