aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/routing.textile
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-06-06 22:23:30 +0200
committerXavier Noria <fxn@hashref.com>2011-06-06 22:23:30 +0200
commit5e21247131fa7d5484190c9a71b74f9d3f090684 (patch)
tree5eee39fcabb952cafd513caf7e67943bc6b26e98 /railties/guides/source/routing.textile
parent38ad6bb2f566202dd522a0cf31a55a746f122d53 (diff)
parent689e12b828665b7b2cfcda85d46249c5cf2aa713 (diff)
downloadrails-5e21247131fa7d5484190c9a71b74f9d3f090684.tar.gz
rails-5e21247131fa7d5484190c9a71b74f9d3f090684.tar.bz2
rails-5e21247131fa7d5484190c9a71b74f9d3f090684.zip
Merge branch 'master' of git://github.com/lifo/docrails
Conflicts: activerecord/RUNNING_UNIT_TESTS
Diffstat (limited to 'railties/guides/source/routing.textile')
-rw-r--r--railties/guides/source/routing.textile2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile
index 08615bed4e..1cbc5c8f6e 100644
--- a/railties/guides/source/routing.textile
+++ b/railties/guides/source/routing.textile
@@ -288,7 +288,7 @@ When using +magazine_ad_path+, you can pass in instances of +Magazine+ and +Ad+
You can also use +url_for+ with a set of objects, and Rails will automatically determine which route you want:
<erb>
-<%= link_to "Ad details", url_for(@magazine, @ad) %>
+<%= link_to "Ad details", url_for([@magazine, @ad]) %>
</erb>
In this case, Rails will see that +@magazine+ is a +Magazine+ and +@ad+ is an +Ad+ and will therefore use the +magazine_ad_path+ helper. In helpers like +link_to+, you can specify just the object in place of the full +url_for+ call: