2017/06/27分のコミットです。
CHANGELOGへの追加はありませんでした。
Merge pull request #29519 from Edouard-chin/ec-structure-flags-order
activerecord/lib/active_record/tasks/mysql_database_tasks.rb
の修正です。
MySQLのdump / load処理で、structure_dump_flags
/ structure_load_flags
に指定したオプションを最初にコマンドに渡すよう修正しています。
mysqlではオプションを渡す順番に意味があり、たとえば--no-defaults
のようなオプションは他のオプションより先に渡す必要がある為との事です。
参考:MySQL :: MySQL 5.7 Reference Manual :: 4.2.7 Command-Line Options that Affect Option-File Handling
Merge pull request #29511 from jhawthorn/clear_offsets_cache_on_collection_proxy
activerecord/lib/active_record/associations/collection_proxy.rb
の修正です。
CollectionProxy#reset
/ CollectionProxy#reload
で find_nth
で取得したレコードのキャッシュをクリアーするよう修正しています。
rails guideのRuby on Rails Security Guide
の修正です。
Brakeman - Rails Security Scannerへのリンクの後にスペースを追加しています。
Merge pull request #29560 from fatkodima/remove_unnecessary_tap_call
railties/lib/rails/application/default_middleware_stack.rb
の修正です。
DefaultMiddlewareStack#build_stack
でActionDispatch::MiddlewareStack
をnewした結果をtap
していたのを、tap
を削除しています。
ActionDispatch::MiddlewareStack#initialize
の中でblockのyields処理が行われており、tap
する必要は無い為。
Merge pull request #29568 from kamipo/ensure_using_correct_alias_tracker
Active Recordの修正です。
Associations::AliasTracker
クラスでtype casterに誤ったクラスが指定されてしまうバグがあったのを修正しています。
Merge pull request #29557 from kamipo/extract_build_scope_and_predicate_builder
Active Recordの修正です。
build_scope
及びpredicate_builder
をReflection
moduleに切り出しています。
Merge pull request #29571 from kamipo/fix_extracting_references_via_order_values
activerecord/lib/active_record/relation/query_methods.rb
の修正です。
WhereChain#preprocess_order_args
メソッドでreferences
を取得する際に、テーブル名をquoteしている場合に、テーブル名が正しく取得出来ないバグがあったのを修正しています。
railties/lib/rails/generators/rails/app/templates/gitignore
の修正です。
デフォルトで生成されるgitignoreに/public/assets
を追加しています。
assets precompileでのファイル生成は各環境で行うべきであり、バージョン管理に追加すべきではない為。そういえば何で今までで追加されてなかったんだろう。
ActiveJob::Core#serialize stores provider_job_id (fixes #26581).
activejob/lib/active_job/core.rb
の修正です。
ActiveJob::Core#serialize
メソッドでprovider_job_id
を含むよう修正しています。
serialize対象に入っていないと、after_enqueue
やbefore_perform
等のcallbackで値が取得出来ない為。
Document ActiveRecord’s PostgreSQL-specific support for JSONB datatype in RailsGuides
rails guideのActive Record and PostgreSQL
の修正です。
JSON
の項をJSON and JSONB
に修正し、jsonb
を使用した場合のexampleを追加しています。
Skip instantiating NullPreloader
if assoc.klass
is nil
activerecord/lib/active_record/associations/preloader.rb
の修正です。
assoc.klass
がnilの場合に、不要なNullPreloader
のインスタンス生成処理を行わないよう修正しています。
Move constructing polymorphic type to join_scope
in Reflection
Active Recordの修正です。
JoinAssociation#join_constraints
で行っていた polymorphic typeの生成処理を、Reflection
moduleのjoin_scope
メソッドで行うようリファクタリングしています。
Move building constraint to join_scope
in Reflection
Active Recordの修正です。
JoinAssociation#join_constraints
で行っていたconstraint
の生成処理を、Reflection
moduleのjoin_scope
メソッドで行うようリファクタリングしています。