2017/08/16分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Don’t expose write_attribute_without_type_cast
activerecord/lib/active_record/attribute_methods/dirty.rb
の修正です。
AttributeMethods::Dirty#write_attribute_without_type_cast
の可視性をpublicからprivateに変更しています。
オーバーロード元であるAttributeMethods::Write#write_attribute_without_type_cast
メソッドはprivateになっており、元の可視性を維持する為。
Add system_test logs to guide [ci skip]
rails guideのGetting Started with Engines
、Creating and Customizing Rails Generators & Templates
の修正です。
scaffold generatorの実行例に、system testの実行例が含まれていない箇所があったのを修正しています。
minor tweaks in Active Storage after a walkthrough
Active Storage の修正です。
各docのフォーマット、グラマーの修正。及び不要な改行の削除等を行っています。
が、不要と思われた改行は意図的だった為、後ほど再度修正しています。
Merge pull request #30261 from bogdanvlviv/improve-guides-plugins
rails guideのThe Basics of Creating Rails Plugins
の修正です。
exampleコードのフォーマットの整理及び使用するメソッドの改善、その他リンクの修正等ガイド全体の見直しを行っています。
Add –skip-yarn option to the plugin generator
railties/lib/rails/generators/rails/plugin/plugin_generator.rb
、
railties/lib/rails/generators/rails/plugin/templates/gitignore
の修正です。
plugin generatorに--skip-yarn
オプションを指定出来るよう修正しています。
Merge pull request #30271 from kamipo/through_scope_should_not_be_affected_by_scoping
Active Recordの修正です。
scoping
で本来参照されないべきのhas_many through先のscopeが参照されてしまうバグがあったのを修正しています。
restores some double newlines deleted in ae87217
Active Storageの修正です。
minor tweaks in Active Storage after a walkthrough で誤って削除してしまった改行を戻しています。メソッド群の区切りの為に改行を2つ意図的に入れているとの事です。
Merge pull request #30045 from albertoalmagro/fix-raise-unpermitted-parameters-regression
actionpack/lib/action_controller/railtie.rb
、
activesupport/lib/active_support/lazy_load_hooks.rb
の修正です。
ActiveSupport::LazyLoadHooks#on_load
メソッドに、処理を一度だけ行いたい時ようのrun_once
オプションを追加しています。
ActiveSupport.on_load(:action_controller, run_once: true) do ... end
上記のように指定した場合、on_load
hookが複数回呼ばれても、ブロックは一度だけしか実行されないようになります。
合わせて、action_controller
のon_load
hookにrun_once
オプションを指定するよう修正しています。
Add test case to make sure Parameters configuration are executed once
railties/test/application/configuration_test.rb
の修正です。
ActionController::API
のload処理が呼ばれるよう各テストに処理を追加しています。
ActionController::Base
、ActionController::API
それぞれのload処理が呼ばれた際に、on_load
ブロックが一度しか呼ばれない事(先のコミットでrun_once
オプションを指定している為)を確認する為。
Fix test “_before_type_cast” for enum (#29004)
activerecord/test/cases/enum_test.rb
の修正です。
_before_type_cast
メソッドについてのテストに、enumの値を指定した前後の状態でのテストを追加しています。
Refactor enum to be defined in terms of the attributes APIで_before_type_cast
の挙動が変更されており、その変更内容を確認する為にテストも変更しています。
EnforcedStyle: context_dependent
copを使用するよう.rubocop.yml
を修正、及び、各ファイルに先copを適応しています。
Change namespace of Active Storage rake task
activestorage/lib/tasks/activestorage.rake
の修正です。
Active Storageのrake taskのnamespaceをactivestorage
からactive_storage
に修正しています。
Active Storageのmigrationをインストールするrake taskのnamespaceがactive_storage
になっており、それと合わせる為。
Remove period from within links
rails guideのRuby on Rails Security Guide
の修正です。
Additional Resources
の項、リンクの中にピリオドが含まれていたのを、ピリオドはリンクの外(aタグの外)に入れるよう修正しています。
rails guideのA Guide for Upgrading Ruby on Rails
の修正です。
ActionView::Helpers::RecordTagHelper
について説明している箇所のグラマーの修正を行っています。
rails guideのActive Record Callbacks
の修正です。
Transaction Callbacks
の項のグラマーの修正を行っています。