2018/06/14分のコミットです。
CHANGELOGへの追加はありませんでした。
Add missing documentation about config.action_mailer.preview_interceptors
[ci skip]
rails guideのConfiguring Rails Applications
の修正です。
config.action_mailer.preview_interceptors
についての説明を追加しています。
2018/06/14分のコミットです。
CHANGELOGへの追加はありませんでした。
Add missing documentation about config.action_mailer.preview_interceptors
[ci skip]
rails guideのConfiguring Rails Applications
の修正です。
config.action_mailer.preview_interceptors
についての説明を追加しています。
2018/06/13分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Add ability to configure cache notifications info
activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
の修正です。
cache notificationsのpayloadをメソッド内で固定で保持していたのを、値をメソッドに切り出して、アプリ側で任意の値を追加出来るようにしています。
GitHubでは接続先のhostとurlをpayloadに追加するようにしているとの事です。
Update "Active Support Core Extensions" Guide
rails guideのActive Support Core Extensions
の修正です。
Date
, Time
, DateTime
に定義されているメソッドについて説明している箇所で、メソッドが定義されているファイルにいての説明に誤りがあったのを修正しています。
Merge pull request #29373 from untidy-hair/store_accessor_enhance
activerecord/lib/active_record/store.rb
の修正です。
ActiveRecord::Store.store_accessor
に任意のsuffixを指定出来るsuffx
オプションを追加しています。suffix
オプションには任意のsuffix(String又はSymbolで指定)、または、true
が指定出来るようになっています。true
を指定した場合はattribute + accessorでアクセス出来るようになります。
Merge pull request #32306 from danhuynhdev/feature/store-accessor-prefixので、prefixは指定出来るように既になっていた為、これでprefix / suffix両方指定出来るようになっています。
2018/06/12分のコミットです。
CHANGELOGへの追加はありませんでした。
Merge pull request #29939 from arthurchui/activerecord-delete-associations-loop
activerecord/lib/active_record/associations/collection_association.rb
の修正です。
CollectionAssociation#remove_records
メソッドでtarget
から既にあるassociationを削除する際に、Array#delete
を使用していたのを、Hash#select!
を使用するよう修正しています。
Hash
の方が高速(Arrayだと計算量がO(N2)だけど、HashだとO(N))な為。が、これについては次のコミットで別な形で再度修正されています。
Use -=
to change the update the collection on the association
activerecord/lib/active_record/associations/collection_association.rb
の修正です。
CollectionAssociation#remove_records
メソッドでtarget
から既にあるassociationを削除するのに-=
を使用するよう修正しています。
target=
メソッドを使用すると、associationがload済みになり、次にreaderにアクセスする際にqueryの実行が抑止出来る為。が、これはこれで別の問題があった為、また次のコミットで修正されています。
activerecord/lib/active_record/associations/collection_association.rb
の修正です。
associationを削除するのにtarget=
メソッドを使用せず、@target
を直接更新するよう修正しています。
ここでassociationをload済みにしてしまうと、オブジェクトが古い状態のままになってしまう場合がある為。
Merge pull request #32997 from utilum/dev_dep_guide_update_ast_requirements
Development Dependencies Install
guideに Active Storageのテストで必要なパッケージ(ffmpeg
、mupdf
等)のインストール方法についての説明を追加しています。
Merge pull request #33092 from utilum/warnings_in_contribute_guide
rails guideのContributing to Ruby on Rails
の修正です。
Warnings
の項でRUBYOPT=-W0
を指定するとwarningが表示されなくなる旨説明が記載されていたのですが、実際はその挙動にならない(warningは表示される)為、該当の説明を削除しています。
Merge pull request #33106 from marcandre/datecalc
activesupport/lib/active_support/core_ext/date_and_time/calculations.rb
の修正です。
DateAndTime::Calculations
moduleで曜日の管理をするのに、月曜が0
になっていたのを、日曜が0
になるよう修正しています。
曜日を計算するのにwday
から1引いてから計算する(Rubyのwdayは日曜が0ので、各メソッドでcurrent_day_number = wday != 0 ? wday - 1 : 6
というのを最初にやっていた)という不要な処理を削除する為。
Fix bug with eager_load in development environment
actionpack/lib/action_dispatch/journey/routes.rb
の修正です。
eager_load
をdevelopmentでtrueにしている、かつ、Routeが空の場合にArgumentError
が発生してしまうバグがあったのを修正しています。
Remove backticks around proejct names
rails guideのActive Storage Overview
、Development Dependencies Install
の修正です。
XQuartzやPoppler等のプロジェクト名をバッククォートで囲まないよう修正しています。
Fix active_model/errors docs [ci skip]
activemodel/lib/active_model/errors.rb
のdocの修正です。
ActiveModel::Errors#full_message
メソッドのdocから不要なインデントを削除しています。
Add changelog for #32956 [ci skip]
activemodel/CHANGELOG.md
の修正です。
ActiveModel::Errors#full_message
メソッドで出力するエラーメッセージのフォーマットを変更出来るよう対応した、Allow to override the full_message error formatについてCHANGELOGにエントリーを追加しています。
Add comma to example in guides/source/active_storage_overview.md [ci skip]
rails guideのActive Storage Overview
の修正です。
Attaching File/IO Objects
の項にあるexampleコードでカンマが不足していたのを修正しています。
Remove reference to session_store.rb initializer
actionpack/lib/action_dispatch/middleware/session/cookie_store.rb
の修正です。
既に存在しないinitializer(config/initializers/session_store.rb
)に言及している箇所があったのを削除しています。
2018/06/11分のコミットです。
CHANGELOGへの追加はありませんでした。
Fix alias confliction when joining same table on has many through with left_joins
activerecord/lib/active_record/associations/alias_tracker.rb
の修正です。
has many through + left_joinsで同じテーブルをjoinした場合に、そのテーブルに同じaliasが使われてしまい、結果エラーになるSQLが生成されてしまうバグがあったのを修正しています。
Merge pull request #33093 from rails/use-rack-to-dump-query
actionpack/lib/action_controller/test_case.rb
の修正です。
ActionController::TestRequest
クラスでqueryを生成するのにHash#to_query
メソッドを使用していたのを、Rack::Utils.build_nested_query
を使用するよう修正しています。
Hash#to_query
はメソッド内で値をソートしてしまっており、結果、送信したparamsと生成されれる内容が一致しない、という問題があった為、Rack::Utils.build_nested_query
を使用するようにしています。
Merge pull request #32956 from Shopify/i18n_activemodel_errors_full_message
activemodel/lib/active_model/errors.rb
、
activemodel/lib/active_model/railtie.rb
の修正です。
ActiveModel::Errors#full_message
メソッドで出力するエラーメッセージのフォーマットを変更出来るよう修正しています。
元々、:"errors.format"
で上書き出来るようになっていましたが、これは全体に影響がある設定で、attribute個別の上書きは出来ませんでした。で、今回左記以外のkeyで、フォーマットの上書きが出来るようになっています。具体的には、
activemodel.errors.models.person/contacts/addresses.attributes.street.format activemodel.errors.models.person/contacts/addresses.format activemodel.errors.models.person.attributes.name.format activemodel.errors.models.person.format
のように、model + attributes + format、又は、model + formatのkeyを追加で見るようになっています。
なお、このkeyは、config.active_model.i18n_full_message
にtrueを指定した場合にだけ見に行くようになっています。
actioncable/test/stubs/test_adapter.rb
の修正です。
不要なsubscribe_called
accessorを削除しています。
2018/06/10分のコミットです。
CHANGELOGへの追加はありませんでした。
Update config.active_storage.variable_content_types
default value in guides [ci skip]
rails guideのConfiguring Rails Applications
の修正です。
config.active_storage.variable_content_types
のデフォルト値についての説明を最新の内容に更新しています。
activerecord/CHANGELOG.md
の修正です。
不要なスペースを削除しています。
2018/06/09分のコミットです。
CHANGELOGへの追加はありませんでした。
Inherit all actioncable's test classes from ActionCable::TestCase
Action Cableのテストの修正です。
各テストクラスの親クラスにActiveSupport::TestCase
を指定している箇所テストがあったのを、ActionCable::TestCase
を使用するよう統一しています。
Include ActiveSupport::Testing::MethodCallAssertions
to ActionCable::TestCase
Action Cableのテストの修正です。
テストクラス毎にActiveSupport::Testing::MethodCallAssertions
をincludeしていたのを、ActionCable::TestCase
でincludeするよう修正しています。
Remove extra include ActiveSupport::Testing::MethodCallAssertions
activesupport/test/testing/method_call_assertions_test.rb
の修正です。
ActiveSupport::Testing::MethodCallAssertions
のincludeを削除しています。
テスト実行前にActiveSupport::TestCase
にActiveSupport::Testing::MethodCallAssertions
をinclude済みの為。
Include ActiveSupport::Testing::MethodCallAssertions
in railties/test/isolation/abstract_unit.rb
railtiesのテストの修正です。
ActiveSupport::TestCase
でActiveSupport::Testing::MethodCallAssertions
をincludeするよう修正しています。
Merge pull request #27577 from maclover7/jm-fix-27547
actioncable/lib/action_cable/subscription_adapter/postgresql.rb
の修正です。
Action CableでadapterにPostgreSQL adapterを使用している場合に、Active Recordで管理しているDBのconnectionをそのまま使いまわしていたのを、connectionを取得した際そのconnectionをAction Recordの管理から外し、Action Cable側で管理するよう修正しています。
Active Recordで管理しているconnectionをそのまま利用していると、Active Record側でconnectionを破棄した際に、Aciton Cable側のconnectionも予期せず破棄されてしまう為。
Merge pull request #33087 from bogdanvlviv/document-CompareWithRange
activesupport/lib/active_support/core_ext/range/compare_range.rb
のdocの修正です。
CompareWithRange
moduleで定義されているメソッド(===
、include?
、cover?
)がAPI docに表示されるよう:nodoc:
を削除しています。これらのメソッドは既にguideに記載されており、publicメソッドな為。
.travis.yml
の修正です。
rails-ujsのテストで使用するNode.jsのバージョンを10.3.0に固定しています。10.4.0だと何故かエラーになってしまう為。
Merge pull request #33078 from bogdanvlviv/add-remove-require
Active Supportの修正です。
不要なrequireの削除、及び、不足していたrequireの追加を行っています。
2018/06/08分のコミットです。
CHANGELOGへの追加はありませんでした。
Refactor activestorage/test/models/attached_test.rb
activestorage/test/models/attached_test.rb
の修正です。
attachmentテストのリファクタとして、使用していないActiveJob::TestHelper
のincludeを削除、テストでUser
クラスに追加したメソッドをテストの後処理で削除するよう修正、及び、remove_method
メソッドを呼び出すのにsend
を使用していたのを、send
無しで呼ぶよう修正しています。
が、remove_method
がpublicになってのはRuby 2.5からで、Ruby 2.4ではsend
が必要な為、後ほどrevertされています。
rails guideのActive Support Core Extensions
の修正です。
index_with
メソッドのexampleで、レシーバーの指定が漏れていた箇所があったの、及び、不要な配列の指定があったのを修正しています。
Revert "Merge pull request #33085 from bogdanvlviv/refactor-attached_test.rb"
attachmentテストのリファクタを行った、Refactor activestorage/test/models/attached_test.rbをrevertしています。
Refactor activestorage/test/models/attached_test.rb
activestorage/test/models/attached_test.rb
の修正です。
attachmentテストのリファクタのリトライです。remove_method
以外の対応だけ行うようにしています。