なるようになるブログ

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

rails commit log流し読み(2015/10/20)

2015/10/20分のコミットです。

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


added Rails 4 context for migrations:install task

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

Engine setupの項、移行のRakeコマンドはtest/dummyディレクトリ配下で実行する旨説明を追加しています。


Merge pull request #21987 from yui-knk/refactor_where

activerecord/lib/active_record/relation/query_methods.rbactiverecord/lib/active_record/relation/where_clause_factory.rbの修正です。

Active Recordのwhereメソッドに使用できない型のオブジェクトが渡された場合にArgumentErrorをraiseするようにした対応をwhereメソッドではなくWhereClauseFactory#buildで行うよう対応した、Move the handling of supported arguments to whereを、テストを通るよう対応し、再度コミットしています。


Merge pull request #21978 from ctreatma/console_helper_reload

railties/lib/rails/console/helpers.rbの修正です。

helperメソッドApplicationController.helpersメモ化していたのを、メモ化しないよう修正しています。

-      @helper ||= ApplicationController.helpers
+      ApplicationController.helpers

メモ化してしまうと、console上でreloadしてもhelperの結果が更新されないので、メモ化を削除したとの事です。


Delete needless require 'active_support/deprecation'

各ファイルから、不要なactive_support/deprecationのrequire処理を削除しています。

active_support/railsをrequireしたら、自動的にactive_support/deprecationもrequireされる為、との事です。


[ci skip] Replace "destroymethod" withdestroyaction

rails guideのRails Routing from the Outside Inの修正です。

Resources on the Webの項、httpのDELETEメソッドの処理について説明している箇所の、"destroy method"と記載していた箇所を、"destroy action"に修正しています。

実際呼ばれるのはdestroyメソッドなのですが、この項は、routerのアクションについて説明している箇所であり、actionの方が適切だろう、という事で修正されています。