なるようになるブログ

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

rails commit log流し読み(2014/09/01)

2014/09/01分のコミットです。

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


Allow polymorphic routes with nil when a route can still be drawn

actionpack/lib/action_dispatch/routing/polymorphic_routes.rbの修正です。

polymorphic routesにnilを指定した場合にエラーになっていたのを対応しています。

issueから抜粋。

resources :blogs do
  resources :posts
end

resources :posts

上記のようなroutingを定義していた場合に、@blognilの場合にurl_for([@blog, @post])がエラーになってしまっていたのを対応しています。

rails 4.2.0.beta1 で起きたリグレッションとの事です。


Since /console is an optional feature, mention <%= console %> instead.

"railties/lib/rails/generators/rails/app/templates/Gemfile"のdocの修正です。

web-consoleについて、現状の仕様と合うよう説明を修正しています。

-  # Access an IRB console on exceptions page and /console in development
+  # Access an IRB console on each exception page or by using <%%= console %> in any view

web-console 2.0.0.beta2 では、自動ではconsoleのマウントされないので、上記のように修正を行ったようです。

なお、web-consoleはいずれ自動マウントの設定をtrueにする予定との事です。


Keep it closer to the original wording [ci skip]

"railties/lib/rails/generators/rails/app/templates/Gemfile"のdocの修正です。

上記修正について文面を元の文面に近づけるよう修正しています。


Clear schema cache before each test

activerecord/test/cases/adapters/mysql2/boolean_test.rbの修正です。

setup処理で@connection.clear_cache!を行うよう対応しています。


Fix for configuring rails guide

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

ログ出力処理について、現状の仕様と異なる箇所があったのを修正しています。


Merge pull request #16763 from brainopia/patch-1


Clear schema cache before each test

activerecord/test/cases/adapters/mysql/consistency_test.rbの修正です。

setup処理で@connection.clear_cache!を行うよう対応しています。


Merge pull request #16704 from ankit1910/use-existing-method

activerecord/lib/active_record/attribute_methods/query.rbの修正です。

query_attributeメソッドでattributeを取得するさい、 read_attributeメソッドではなく、selfを使用するよう修正しています。

-        value = read_attribute(attr_name) { |n| missing_attribute(n, caller) }
+        value = self[attr_name]