なるようになるブログ

読書感想文かrailsについてかrubyについてか

rails commit log流し読み(2018/01/23)

2018/01/23分のコミットです。

CHANGELOGにのったコミットは以下の通りです。

activesupport/CHANGELOG.md

activerecord/CHANGELOG.md


Ignores a default subclass when becomes(Parent)

activerecord/lib/active_record/persistence.rbの修正です。

STIを使用している、かつ、typeにデフォルト値が指定されている場合に、サブクラスでbecome(Parent class)を指定した場合に、戻り値がParentではなく、デフォルトに指定されているclassになってしまうバグがあったのを修正しています。


Add support for connection pooling on RedisCacheStore

Active Supportの修正です。

redis cache storeにconnection poolingのサポートを追加しています。Support for connection pooling on mem cache storeのredis cache store版。

pool_sizeオプションを指定した場合のみconnection poolが使用されるようになっています。connection pool部分の実装は同じくmperham/connection_pool gemを使用しています。


Support for PostgreSQL foreign tables

activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rbactiverecord/lib/active_record/connection_adapters/postgresql_adapter.rbの修正です。

PostgreSQLのforeign tablesについてのサポートを追加しています。

これにより、foreign tablesで定義されたtableも、普通のtableやviewと同様にActive Recordから操作出来るようになっています。


Fix building has_one through record

activerecord/lib/active_record/associations/has_many_through_association.rbactiverecord/lib/active_record/associations/has_one_through_association.rbの修正です。

has_one through associationを使用している場合に、associationに対するbuild処理でエラーになってしまうバグがあったのを修正しています。


Update guide text not to contradict image

rails guideのGetting Started with Railsの修正です。

Getting Up and Runningの項、ActionController::UnknownFormatが出た場合の説明で、エラーが発生した場合の画像で一部行を切り捨てている旨説明がされていたのですが、実際は切り捨てられてはいなかった為、該当の説明を削除しています。


remove text repetition

rails guideのGetting Started with Railsの修正です。

Getting Up and Runningの項のグラマーの修正を行っています。


Add missing require

activestorage/lib/active_storage/downloading.rbの修正です。

不足していたtmpdirのrequireを追加しています。


Improve fault tolerance for redis cache store

activesupport/lib/active_support/cache/redis_cache_store.rbactivesupport/test/cache/behaviors.rbの修正です。

redis cache storeのincrementdecrement、及び、read_multiでredis serverに接続出来なかった場合に、exceptionがraiseされていたのを、exceptionがraiseされないよう修正しています。

他のメソッド(write_entrywrite_multi_entries等)ではそのような挙動になっていたのと、mem cache storeと挙動を合わせる為、のようです。


Fix locale_selector JS bug in ActionMailer Preview

railties/lib/rails/templates/rails/mailers/email.html.erbの修正です。

Action Mailerのemail previewでlocaleが一つしか無い場合に、mimeを切り替えるとJSでエラーになってしまうバグがあったのを修正しています。