This project is archived and is in readonly mode.
polymorphic_url should treat an array contains single name as without the container
-
DHH
I'm not sure I quite understand what this does? What was the behavior before this?
-
hiroshi
Before this change, the test I added failed.
1) Error: test_with_array_containing_single_name(PolymorphicRoutesTest): NoMethodError: undefined method `articles_nil_class_url' for #<PolymorphicRoutesTest:0x1045528>However, giving an array consists of an object doesn't raise NoMethodError nor any.
def test_with_array_containing_single_object @article.save expects(:article_url).with(@article) polymorphic_url([nil, @article]) # argument will be [@article] with former patch #1317 endI wish this explain my intention.
-
Repository
- State changed from new to committed
(from [591560c641d52f6a8fb12a26c60c3f812735ac0d]) Let polymorphic_path treat an array contains single name as without array [#1386 polymorphic_url should treat an array contains single name as without the con... state:committed]
Signed-off-by: David Heinemeier Hansson david@loudthinking.com http://github.com/rails/rails/co...
-
Repository
(from [291d199de1271c254c44b94766d13013b222a125]) Let polymorphic_path treat an array contains single name as without array [#1386 polymorphic_url should treat an array contains single name as without the con... state:committed]
Signed-off-by: David Heinemeier Hansson david@loudthinking.com http://github.com/rails/rails/co...
