なるようになるブログ

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

rails commit log流し読み(2015/04/01)

2015/04/01分のコミットです。

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


Make method as nodoc since we are already docummenting at AbstractAdapter

activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rbのdocの修正です。

change_column_defaultメソッド:nodoc:を追加しています。


Fix eager loading association using default_scope for finder methods.

activerecord/lib/active_record/scoping/default.rbの修正です。

クラスメソッドとしてdefault_scopeを定義した場合に、find系のメソッドdefault_scopeが設定されなバグがあったのを修正しています。


Remove unused subdir deployment considerations section [ci skip]

rails guideのConfiguring Rails Applicationsの修正です。

利用されていないConsiderations when deploying to a subdirectoryセクションを削除しています。


Only coerce time when comparing if necessary

activesupport/lib/active_support/core_ext/time/calculations.rbの修正です。

compare_with_coercionメソッドで、引数のクラスがTimeだった場合に、不要なto_timeの呼び出しを行わないよう修正しています。

-    if other.is_a?(Time)
+    # we're avoiding Time#to_datetime and Time#to_time because they're expensive
+    if other.class == Time
+      compare_without_coercion(other)
+    elsif other.is_a?(Time)
       compare_without_coercion(other.to_time)

Update routing.md

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

Routing to Rack Applicationsの項にmountメソッドを使用した場合のexample、説明を追加しています。


[ci skip] Fix :having option with having method

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

Havingメソッドの説明で、havingメソッドhavingオプション、と誤って説明してしまっていた箇所があったのを修正しています。


[ci skip] fix guides example on arbitrary SQL execution

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

When Helpers aren't Enoughの項、executeメソッドのexampleに記載してあるSQLが、実際動作しないSQLだった為、動作するようSQLを修正しています。