2014/04/22分のコミットです。
favicon_link_tag
で生成されるHTMLのdefaultのMIMEタイプが変更されています。
Rearrange deck chairs on the titanic. Organize connection handling test cases.
ActiveRecord::ConnectionAdapters
のテストの修正です。テストコードの書き先を修正しています。
select! renamed to avoid name collision Array#select!
ActiveRecord::QueryMethods::WhereChain
のselect!
メソッドを_select!
メソッドに名前を変更しています。
ActiveRecord_RelationがArrayのような振る舞いをしている為、Array#select!
の挙動を期待してselect!
を実行したのに結果がおかしい、issueがあった為、メソッド名を変更して、明示的にNoMethodError
が出るようにしています。
Before: todos = Todo.all todos.select!{|t| false} # ActiveRecord::ImmutableRelation: ActiveRecord::ImmutableRelation After: todos = Todo.all todos.select!{|t| false} # NoMethodError: undefined method `select!' for #<Todo::ActiveRecord_Relation:0x007f9758745508>
rails 4.1だと、そもそも動かない感じでした。
Add test for using ActionView::Helpers::FormHelper.label with block and html
ActionView::Helpers::FormHelper.label
メソッドのテストケースを追加しています。
Merge pull request #10764 from mokevnin/replace_class_eval_by_define_method
abstract_controller/callbacks
動的にメソッドを生成するのに、class_eval
を使っていたのをdefine_method
を使うように修正しています。
class_eval/define_methodを使った場合の性能の違い等について、tenderloveのブログに詳しい説明が載っています。
define_method
の方が速度早いんですね。処理的にも、メソッドを定義している、事が明確になって良い気がします。
Merge pull request #13335 from glorieux/favicon_link_tag_mimetype
favicon_link_tag
のdefaultのMIMEタイプが変更されました。
Before: #=> favicon_link_tag 'myicon.ico' <link href="/assets/myicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" /> After: #=> favicon_link_tag 'myicon.ico' <link href="/assets/myicon.ico" rel="shortcut icon" type="image/x-icon" />
favicon、基本MIMEはimage/x-icon
で指定するのですが、IANAに登録されいているのは、image/vnd.microsoft.icon
なんですよね。ややこしい。
Fix run-on sentences and improve grammar [skip ci]
rails guideの修正。Getting Startedのグラマーの修正です。