2016/01/12分のコミットです。
CHANGELOGへの追加はありませんでした。
Allow manually setting environment value
activerecord/lib/active_record/migration.rb
、
activerecord/lib/active_record/railties/databases.rake
の修正です。
Merge pull request #22967 from schneems/schneems/generic-metadataで、DB破壊系のtask(db:drop
、db:purge
)等を指定された環境(デフォルトはproduction
)で動作しないよう対応されたのですが、その環境の値をrake taskから指定出来るよう修正しています。
元々はDB(active_record_internal_metadatas
テーブル)から取得するようになっていたのですが、active_record_internal_metadatas
テーブルはdb:migrateしないと生成されない為、db:migrateせずに処理を実行したい、というような場合の為に対応したようです。多分。
Active scopes apply to child classes, though not parents/siblings
activerecord/lib/active_record/scoping.rb
の修正です。
STIを使用している際に、同じ親クラスを持つクラスの子クラスに、親クラスのscopeが汚染してしまう問題があったのを修正しています。
Skip the STI condition when evaluating a default scope
activerecord/lib/active_record/core.rb
、
activerecord/lib/active_record/scoping/default.rb
の修正です。
STIを使用している、かつ、baseクラスではない親クラスにdefault_scope
の設定があった場合に、そのscopeが子クラスに反映されてしまう問題があたのを修正しています。
actionpack/lib/action_controller/metal/strong_parameters.rb
の修正です。
ActionController::Parameters#fetch
メソッド、ActionController::Parameters#delete
メソッドから不要な&block
引数を削除しています。
Add a note on ActionController guide about 404
rails guideのAction Controller Overview
の修正です。
The Default 500 and 404 Templates
の項、development envではハンドリングされていないExceptionはそのままraiseされる旨説明を追加、及び、production envではActiveRecord::RecordNotFound
が起きた場合404が表示される旨説明を追加しています。
Commit before freezing the headers https://github.com/rails/rails/commit/272c5838dfed0473acc11a9f97d797180015b242
actionpack/lib/action_dispatch/http/cache.rb
、
actionpack/lib/action_dispatch/http/response.rb
の修正です。
Response::Header#before_sending
メソッドで、コミット処理が行われていない場合にコミット処理をするよう修正しています。
通常#before_sending
が呼ばれる時点でコミット処理は行われている筈なのですが、アクションの途中でbodyを読む、といようなな処理が行われた場合に問題になる為、対応を追加したようです。
add migration versioning example to the changelog. [ci skip]
activerecord/CHANGELOG.md
の修正です。
migrationのversioning APIについての対応のentryに、exampleコードを追加しています。