なるようになるブログ

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

rails commit log流し読み(2025/07/28)

2025/07/28分のコミットです。

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

actionview/CHANGELOG.md


Favor Rack and Nokogiri own documentation over rubydoc.info

rails guideの修正です。

RackとNokogiriのdocへのリンクがrubydoc.infoになっていたのを、それぞれ独自に提供しているページ(https://rack.github.io/rack/https://nokogiri.org/rdoc/)に修正しています。


Add relative_time_in_words helper to ActionView

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

time_ago_in_wordsと同様にtimeをstringとして返す、かつ、timeが過去か未来かによってprefix/suffixを追加するrelative_time_in_wordsメソッドを追加しています。

relative_time_in_words(3.minutes.from_now) # => "in 3 minutes"
relative_time_in_words(3.minutes.ago) # => "3 minutes ago"
relative_time_in_words(10.seconds.ago, include_seconds: true) # => "less than 10 seconds ago"

[Fix #55379] Default branch in github ci templates

railtiesの修正です。

rails newで生成するCI用の設定で、branchesの指定がmain固定だったのを、Gitのdefault branchの値を取得しその値を指定するよう修正しています。