なるようになるブログ

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

rails commit log流し読み(2017/02/12)

2017/02/12分のコミットです。

CHANGELOGへの追加はありませんでした。


Merge pull request #27870 from kenta-s/get-todo-done-in-render_test

actionview/test/template/render_test.rb、及び、rails guideのLayouts and Rendering in Rails`の修正です。

Options for renderの項に、指定したformatに対応するtemplateが無い場合、MissingTemplateがraiseされる旨説明を追加、及びその挙動を確認する為のテストのテスト名をより明確な名前に修正しています。


[ci skip] Fully qualify missing template error.

rails guideのLayouts and Rendering in Railsの修正です。

MissingTemplateActionView::MissingTemplateに修正しています。


Deprecate calling attr_will_change! with non-attributes https://github.com/rails/rails/commit/4fed08fa787a316fa51f14baca9eae11913f5050

activerecord/lib/active_record/attribute_methods/dirty.rbactiverecord/lib/active_record/attribute_mutation_tracker.rbの修正です。

attribute_will_change!メソッドの引数にvirtual attributesを指定した場合に、値が変更された事が検知されないバグがあったのを修正、及び、attribute_will_change!にvirtual attributesを指定した場合の挙動をdeprecateにしています。 そもそもvirtual attributesを指定した場合に正常に動作していたのは意図的ではなかった為との事です。


Add Time#blank? to blank_test

activesupport/test/core_ext/object/blank_test.rbの修正です。

blank?メソッドのテスト対象にTime#blank?メソッドを追加しています。


refactors and fixes in guides generation [ci skip]

rails guide生成用スクリプトリファクタリングです。

  • RailsGuides::Generatorクラス内でENVを参照していたのを、RailsGuides::Generator#initializeの引数に必要なパラメータを渡せるようにし、RailsGuides::Generatorクラス内でENVを参照しないよう修正。
  • RAILS_VERSIONはGit tagの値とみなすよう修正。また、RAILS_VERSIONが空の場合にedgeと見なすよう修正。
  • EDGE ENVを削除。
  • local versionを削除。
  • WARNINGSフラグを削除。

等の対応をまとめて行っています。


document link processing in guides generation [ci skip]

rails guideのRuby on Rails Guides Guidelinesの修正です。

Linking to the APIの項を追加し、rails guideからAPI doc(api.rubyonrails.org)へのリンクの設定のされかたについての説明を追加しています。


Add Style/EmptyLinesAroundMethodBody in .rubocop.yml and remove extra empty lines

rubocopのルールにStyle/EmptyLinesAroundMethodBodyを追加、及び各ファイルにルールを適応しています。