なるようになるブログ

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

rails commit log流し読み(2016/09/07)

2016/09/07分のコミットです。

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


Minor grammar fix in engines.md

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

What are engines?の項のグラマーの修正を行っています。


Remove the word "mongrel" from documents

各doc及びコード内にあるmongrelpumaに置き換えています。

mongrelはもうメンテされておらず、最新のRuby / Railsでは使用出来ない為、doc内に説明があるのは良くないだろうという事で削除されました。代わりに、今Railsでデフォルトで使用されているPumaを説明に使用しています。


Merge pull request #24612 from vipulnsward/fix-li-ol-width

guides/assets/stylesheets/main.cssの修正です。

subColクラスにもスタイルを適応するようcssを修正しています。


[ci skip] Remove duplicate example.

ActiveRecord::Associations::CollectionProxy#findのdoc内にあるexampleから、重複していたexampleを削除しています。

が、実際は同じexampleではなく、異なる処理で同じ結果になる、という事を表す為のexampleであり、重複したexampleではありませんでした。という訳で、後ほどrevertされています。


Revert " [ci skip] Remove duplicate example."

というわけで、先ほどの重複していたexampleを削除したコミットをrevertしています。


[ci skip] Simply formatting documents

Rails guideの修正です。

各guide内のexampleコードのフォーマットの修正を行っています。


Clarify expires_now documentation

actionpack/lib/action_controller/metal/conditional_get.rbのdocの修正です。

ActionController::ConditionalGet#expires_nowのdocにあるcacheについての説明を修正しています


call .to_h to avoid using deprecated method

actionpack/lib/action_controller/metal/strong_parameters.rbの修正です。

ActionController::Parameters#mergeメソッドでmergeを行う際に、引数に対してto_hメソッドを呼び出すよう修正しています。

       new_instance_with_inherited_permitted_status(
-        @parameters.merge(other_hash)
+        @parameters.merge(other_hash.to_h)
       )

引数がActionController::Parametersインスタンスだった場合に、そのままmerge処理を行うとdeprecateになっているto_hashメソッドが呼ばれてしまい、deprecateメッセージが表示されてしまう為、それを避ける為に、明示的にHashに変換するようにしています。