なるようになるブログ

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

rails commit log流し読み(2016/04/01)

2016/04/01分のコミットです。

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

actionview/CHANGELOG.md


[ci skip] Parameter filter performs regular expression partial matching

rails guideの修正です。

config.filter_parametersについて説明している箇所に、parameter filterは正規表現でマッチ処理を行う旨説明を追加しています。


Fix method String#upcase_first

activesupport/lib/active_support/inflector/methods.rbの修正です。

空文字列に対してupcase_firstメソッドを呼び出した場合に、NoMethodErrorでエラーになってしまっていたのを、エラーではなく空文字を返すよう修正しています。


Ensure associations still work when the table name contains a dot

Active Recordの修正です。

テーブル名にドットが含まれている場合に、associationsが正しく動作しないバグがあったのを修正しています。


Deprecate table names containing dots

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

テーブル名にドットが含まれている場合のサポートがdeprecateになりました。

多くのバックエンドでドットは特別な意味を持つ為、との事だったのですが、PostgreSQLでは普通にschemaにドットを使用する為、後ほどrevertされています。


Prepared statements shouldn't share a cache with unprepared statements

Active Recordの修正です。

find_by用のstatement cacheがprepared statements が有効・無効に関わらず同じ値を使用していたのを、有効・無効それぞれの場合で別に値を管理するよう修正しています。

prepared statementsが有効時にキャッシュされた値がprepared statementsを無効にした場合でも使用されてしまうバグがあり、その対応の為。


Deprecate datetime_field and datetime_field_tag helpers.

actionview/lib/action_view/helpers/form_helper.rbactionview/lib/action_view/helpers/form_tag_helper.rbの修正です。

datetime_fielddatetime_field_tagがdeprecateになりました。

datetime input typeがHTML仕様から削除された為との事です。今後は代わりにdatetime_local_fielddatetime_local_field_tagを使う必要があります。知らなかった。

参考:Remove input[type=datetime] · Issue #336 · whatwg/html


Revert "Deprecate table names containing dots"

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

先ほどコミットされた、テーブル名にドットが含まれている場合のサポートをdeprecateにしたコミットをrevertしています。


Merge pull request #24379 from Gaurav2728/sanitizer-helper-update-doc

actionview/lib/action_view/helpers/sanitize_helper.rbのdocの修正です。

sanitiser helperはRails 5.1で削除する旨docにコメントを追加しています。


Fixes broken link in 'Ruby on Rails 2.2 Release Notes' [ci skip]

rails guideのRuby on Rails 2.2 Release Notesの修正です。

Finally. Ruby on Rails gets internationalized - artweb design へのリンクが壊れていたのを、修正しています。