なるようになるブログ

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

rails commit log流し読み(2014/12/16)

2014/12/16分のコミットです。

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

actionpack/CHANGELOG.md


Fix minor typos in autoloading guide

rails guideのConstant Autoloading and Reloadingの修正です。

諸々タイポの修正。


autoloading guide: some rewordings [ci skip]

rails guideのConstant Autoloading and Reloadingの修正です。

各説明の語句の言い換えを行っています。


Merge pull request #18026 from hbd225/fix_duplicate_web-console_entries

railties/lib/rails/generators/app_base.rbrailties/lib/rails/generators/rails/app/templates/Gemfileの修正です。

Railsアプリを"--dev"、又は"--edge"オプション付で作成した場合に、Gemfileにweb-consoleが二回定義されていまっていたのを修正しています。


autoloading guide: adds nesting rule for Kernel#load [ci skip]

rails guideのConstant Autoloading and Reloadingの修正です。

Kernel#loadメソッドのnesting ruleについての説明を追加しています。


Already deprecated [ci skip]

rails guideのActive Record Query Interfaceの修正です。

幾つかのdynamic finderメソッドについて、Rails 4.0でdeprecateになる旨説明が記載されていたのですが、もうなっているので、説明を修正しています。


fix a typo [ci skip]

rails guideのConstant Autoloading and Reloadingの修正です。

Kerne#load -> Kernel#loadに修正しています。


fix a typo [ci skip]

rails guideのConstant Autoloading and Reloadingの修正です。

メソッドをバッククォートで囲むよう修正しています。


Improve autoload_paths section

rails guideのConstant Autoloading and Reloadingの修正です。

適切な箇所へのカンマの追加、グラマーの修正等を行っています。


Adding method chaining section on ActiveRecord querying guide [ci skip]

rails guideのActive Record Query Interfaceの修正です。

Method Chainingについて説明する項を追加しています。

ARのどのメソッドメソッドチェーンで呼べるかについて、などの説明が記載されています。


autoloading guide: applies some Strunk & White and hyperlinking [ci skip]

rails guideのActive Record Query Interfaceの修正です。

諸々説明の修正、ページ内リンクの修正等を行っています。


Merge pull request #16924 from Sinjo/params-deep-munge-empty-array

actionpack/lib/action_dispatch/request/utils.rbactionpack/lib/action_controller/log_subscriber.rbの修正です。

params の中の空配列をnilに変換するのを止めています。

元々deep_mergeの変換処理にはいくつか問題があり、過去何度かCVEが作成された事がありました(CVE-2012-2660CVE-2012-2694CVE-2013-0155)。

その都度色々対応がされてきたのですが、そもそも空の際にnilが返さない方が良いのでは無いのか、という事で対応が行われたようです。

その辺りの詳細は、こちらのissueご参考。


Revert "Re-enable capture'ing non-String values"

先日コミットされた、CaptureHelper#captureメソッドがString以外の値もcaptureするようした修正をrevertしています。

content_tagメソッドが予想外の挙動をしてしまう為、revertしたとの事です。

<%= content_tag :div do %>
  <% a = 5 %>
<% end %>

content_tagメソッドの中で何もoutputしてないので、本来何も表示されないべきなのですが、上記captureの対応を行ってしまうと、 上記例で"5"が表示されてしまいます。(最後の式の実行結果がcaptureされてしまう為)


Regression test for #18024

actionview/test/template/tag_helper_test.rbの修正です。

上記content_tagメソッドの本来の挙動についてのテストを追加しています。


Minor typos/fixes to autoloading guide

rails guideのConstant Autoloading and Reloadingの修正です。

諸々タイポの修正。


You need to specify the counter_cache option on the has_many side of the association when using a custom counter cache column. This is documented on the has_many association here: http://apidock.com/rails/ActiveRecord/Associations/ClassMethods/has_many [ci skip]

rails guideのActive Record Associationsの修正です。

counter_cacheオプションについての説明を追加しています。


Ruby will allocate the class as a side-effect, since it is already defined.

rails guideのConstant Autoloading and Reloadingの修正です。

autoloadの際、検索対象のクラスが見つかった場合、そのクラスのアロケーション処理が行われる旨説明追加しています。


Add CHANGELOG for #18034 [ci skip]

guides/CHANGELOG.mdの修正です。

Adding method chaining section on ActiveRecord querying guide [ci skip]の対応について、CHANGELOGに追記しています。

guideのCHANGELOGが更新されるの、大分珍しい気がします。


Merge pull request #17992 from andreynering/guides-intallation


Remove this tip, if the previous statement is true.. ie: The reader sees "Rails

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

RubyWindows環境で使う場合の注意事項について記載されたTIPを削除しています。

後半の説明に誤りがある為のようです。


syncs the autoloading guide and undoes some merged changes [ci skip]

rails guideのConstant Autoloading and Reloadingの修正です。

文法等々修正しています。


missing preposition [ci skip]

rails guideのConstant Autoloading and Reloadingの修正です。

"of"が無かった箇所に追加しています。


undoes a recent merged edit [ci skip]

rails guideのConstant Autoloading and Reloadingの修正です。

"The purpose of autoload_paths" -> "What isautoload_paths`"に修正しています。


[ci skip] :scissors: blank lines between list items.

rails guideのConstant Autoloading and Reloadingの修正です。

不要な空行を削除しています。


decribe deprecation cycle from timestamps null: false to null: true.

rails guideのRuby on Rails 4.2 Release Notesの修正です。

add_timestampst.timestampsnullオプション無しで使用するのがdeprecateになった対応について追記しています。


docs, synchronize CHANGELOG across branches. [ci skip]

rails guideのRuby on Rails 4.2 Release Notesの修正です。

process helpers の修正について記載されている箇所が誤っていたのを修正しています。また、Constant Autoloading and Reloadingが作成された点も追加しています。


Constant autoload grammar fix

rails guideのConstant Autoloading and Reloadingの修正です。

まだまだグラマーの修正です。


Improve section in constant autoload guide

rails guideのConstant Autoloading and Reloadingの修正です。

カンマの追加、言い回しの修正等を実施しています。


Improve grammar

rails guideのConstant Autoloading and Reloadingの修正です。

まだまだグラマーの修正です…。 違いが、解らない…。


English fix [ci skip]

railties/lib/rails/tasks/statistics.rakeのdocの修正です。

stats対象のディレクトリをグローバルの定数に定義していまっていて、本来は良くないのですが、 rspecやcucumberのツールがこの定数に依存してしまっているので、削除する際は事前にdeprecateを出力する必要がある旨説明修正しています。