なるようになるブログ

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

rails commit log流し読み(2022/12/12)

2022/12/12分のコミットです。

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

actionview/CHANGELOG.md


Fix inconsistent behavior in form helper date/time tags with options; issue #46677

Action Viewの修正です。

全てのDatetimeのform helper(time_field, date_field, datetime_field, week_field, month_field)の:valueオプションにTime/Date/DateTimeのインスタンスを指定出来るよう修正しています。

# before
<%= form.datetime_field :written_at, value: Time.current.strftime("%Y-%m-%dT%T") %>

# after
<%= form.datetime_field :written_at, value: Time.current %>

[ci skip] documentation for #36589

activerecord/lib/active_record/migration/command_recorder.rbのdoc、及び、rails guideのActive Record Migrationsの修正です。

migrationに関するメソッドの説明を最新の内容に更新しています。


Use storage/ instead of db/ for sqlite3 db files (#46699)

SQLite3のdbファイルのデフォルトの配置がdb/配下だったのを、storage/配下に変更しています。db/ディレクトリはDB構成用の他のファイルが含まれている、かつ、データの格納場所を他のファイルが含まれない専用のディレクトリにすると、コンテナへのマウントしやすくなる為。


Clarify that config.log_file_size expect a number of bytes

rails guideのConfiguring Rails Applicationsの修正です。

config.log_file_sizeについて説明している箇所に、config.log_file_sizeにはbyte値を指定する必要がある旨説明を修正しています。


Fix corrupted guides/source/configuring.md

rails guideのConfiguring Rails Applicationsの修正です。

先の修正の際に誤って関係無い箇所をごっそり削除してしまったのを元に戻しています。