- 21 9月, 2018 9 次提交
-
-
由 Rafael França 提交于
Ignore psqlrc files when executing psql commands
-
由 George Claghorn 提交于
Correct spelling in "Contributing to Ruby on Rails" guide [ci skip]
-
由 bogdanvlviv 提交于
ambigity -> ambiguity Related to #33891
-
由 Rafael França 提交于
Make sure `assert_enqueued_with()` & `assert_performed_with()` work reliably with hash arguments
-
由 Rafael França 提交于
Contributing to Ruby on Rails Guide: standardize git remote names [ci skip].
-
由 Ryuta Kamizono 提交于
Since #33875, Rails dropped supporting MySQL 5.1 which does not support utf8mb4. We no longer need to use legacy utf8 (utf8mb3) conservatively.
-
由 Sharang Dashputre 提交于
The test helpers now treat `{ a: 1, b: 2 }` and `{ b: 2, a: 1 }` as equals
-
由 Rafael França 提交于
CI against PostgreSQL 10
-
由 Sean Griffin 提交于
Make a deep copy of the _default_attributes in column_defaults
-
- 20 9月, 2018 14 次提交
-
-
由 Ryuta Kamizono 提交于
Update MySQL server version and character set in Rails Guide [skip ci]
-
由 Yasuo Honda 提交于
Related to #33853
-
由 Yuji Yaginuma 提交于
Fixed to RAILS_MASTER_KEY as a default env key for decrypting.
-
由 Wojciech Wnętrzak 提交于
Fixes mistake left in https://github.com/rails/rails/pull/33521/files#diff-2a29095afcfe2c683b82a779a94c2208R59 and misunderstanding in https://github.com/rails/rails/commit/d69b04de0ff33237209afea6f6cac3ab27934908
-
由 Vitor Oliveira 提交于
-
由 Ryuta Kamizono 提交于
Make `ActiveRecord::Result#to_a` as alias to `ActiveRecord::Result#to_ary`
-
由 bogdanvlviv 提交于
`ActiveRecord::Result#to_a` was introduced in #33912. I would prefer to make `to_a` as alias to the `to_ary` because: - It would be clear for users from https://edgeapi.rubyonrails.org/classes/ActiveRecord/Result.html that `to_a` and `to_ary` are the same - For us it would take less efforts in case if we needed to change the docs or implementation, since the methods are the same Follow up #33912
-
由 Ryuta Kamizono 提交于
Don't update counter cache unless the record is actually saved
-
由 Rafael Mendonça França 提交于
When column_defaults is called it calls `value` on each instance of Attribute inside the _default_attributes set. Since value is memoized in the Attribute instance and that Attribute instance is shared across all instances of a model the next call to the default value will be memozied not running the proc defined by the user. Fixes #33031.
-
由 Rafael França 提交于
Deprecate ActiveRecord::Result#to_hash in favor of #to_a
-
由 yuuji.yaginuma 提交于
When using environment specific credentials, `RAILS_MASTER_KEY` is not used.
-
由 Yuji Yaginuma 提交于
Add CSP nonce to `style-src` directive
-
由 Wojciech Wnętrzak 提交于
For `production` environment look first for `config/credentials/production.yml.enc` file that can be decrypted by `ENV["RAILS_MASTER_KEY"]` or `config/credentials/production.key` master key. Edit given environment credentials file by command `rails credentials:edit --environment production`. Default behavior can be overwritten by setting `config.credentials.content_path` and `config.credentials.key_path`.
-
由 Rafael Mendonça França 提交于
When you pass an empty array to find we know we shoudl return an empty array but it is surprising that we are returning the original empty array instead of a new one.
-
- 19 9月, 2018 4 次提交
-
-
由 Kevin Cheng 提交于
method returns an array of hashes, not a hash e.g. Hash.try_convert(result) calls #to_hash and raises a TypeError [Gannon McGibbon + Kevin Cheng]
-
由 Ryuta Kamizono 提交于
This is a 4th attempt to make counter cache transactional completely. Past attempts: #9236, #14849, #23357. All existing counter cache issues (increment/decrement twice, lost increment) are caused due to updating counter cache on the outside of the record saving transaction by assigning belongs_to record, even though assigning that doesn't cause the record saving. We have the `@_after_replace_counter_called` guard condition to mitigate double increment/decrement issues, but we can't completely prevent that inconsistency as long as updating counter cache on the outside of the transaction, since saving the record is not always happened after that. We already have handling counter cache after create/update/destroy, https://github.com/rails/rails/blob/1b90f614b1b3d06b7f02a8b9ea6cd84f15d58643/activerecord/lib/active_record/counter_cache.rb#L162-L189 https://github.com/rails/rails/blob/1b90f614b1b3d06b7f02a8b9ea6cd84f15d58643/activerecord/lib/active_record/associations/builder/belongs_to.rb#L33-L59 so just removing assigning logic on the belongs_to association makes counter cache transactional completely. Closes #14849. Closes #23357. Closes #31493. Closes #31494. Closes #32372. Closes #33113. Closes #33117 Closes #33129. Closes #33458.
-
由 Rafael França 提交于
Follow up #33751
-
由 Ryuta Kamizono 提交于
`topic` and `reply` belongs_to associations on `SillyReply` are defined with the same `foreign_key` (`parent_id`) and `counter_cache` (`replies_count`) columns. This would cause unintentional side-effect (e.g. saving `SillyReply` object would cause double increment `replies_count`), so it is better to avoid that side-effect.
-
- 18 9月, 2018 3 次提交
-
-
由 Yasuo Honda 提交于
- Replace port number 5433 to 5432 (default value) which Active Record unit tests expect - Restart PostgreSQL 10 service after changing port number - PostgreSQL 10 is a addon for the current Travis CI. Installing PostgreSQL 10 would cause longer CI to getting additional apt packages Refer https://docs.travis-ci.com/user/database-setup/#PostgreSQL - Use `sudo: required` for railties CI expecting PostgreSQL is up and running
-
由 Matthew Draper 提交于
Fix a typo in AR Query Interface [ci skip]
-
由 Andrew 提交于
-
- 17 9月, 2018 10 次提交
-
-
由 J Smith 提交于
psqlrc files can affect the execution of commands in ways that can hold up execution by blocking or otherwise cause unexpected side effects and should best be ignored when using psql programmatically.
-
由 Ryuta Kamizono 提交于
Fix deprecation warning of `ActiveRecord::Migrator.migrations_path=`
-
由 Ryuta Kamizono 提交于
`ActiveRecord::MigrationContext.new` just create an instance, doesn't have any side-effect.
-
由 Ryuta Kamizono 提交于
Improve readability in form helpers guide [ci skip]
-
由 tkoyama1988 提交于
-
由 bogdanvlviv 提交于
`ActiveRecord::Migrator.migrations_path=` was deprecated in #31727. This commit fixes: - `ActiveRecord::Migrator.migrations_path=` is deprecated, but not `ActiveRecord::Migrator.migrations_paths=` - Adds missing space The warning including this commit: ``` DEPRECATION WARNING: `ActiveRecord::Migrator.migrations_path=` is now deprecated and will be removed in Rails 6.0. You can set the `migrations_paths` on the `connection` instead through the `database.yml`. ``` Since it was deprecated in Rails 5.2 we should backport it to the `5-2-stable` branch. Related to #31727
-
由 Ryuta Kamizono 提交于
Print correct rake command on running AJ integration tests
-
由 bogdanvlviv 提交于
Currently when executing `bundle exec rake test:integration` under `activejob/` derectory, it prints helpful info like: ``` (snip) *** rake aj:integration:async *** (snip) *** rake aj:integration:delayed_job *** (snip) ``` but there is no defined `:aj` scope in `activejob/Rakefile`, so I think output should be like: ``` (snip) *** rake test:integration:async *** (snip) *** rake test:integration:delayed_job *** (snip) ``` By the way `rake test:integration` doesn't work if execute it without prepending `bundle exec` to that command. It is probably what we should fix too.
-
由 George Claghorn 提交于
Raise `ActiveRecord::InvalidForeignKey` in `before_destroy` for a blob if attachments exist
-
由 Yuji Yaginuma 提交于
PostgreSQL: prepare for pg-1.1
-