Skip to content
Browse files

document how to create non show paths from an array of parameters

  • Loading branch information...
1 parent 25ad2e9 commit f2f556d583aebf95f2f5163c96538ae6b6437d38 Florent Guilleux committed Feb 26, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 railties/guides/source/routing.textile
View
6 railties/guides/source/routing.textile
@@ -301,6 +301,12 @@ If you wanted to link to just a magazine, you could leave out the +Array+:
<%= link_to "Magazine details", @magazine %>
</erb>
+For other actions, you just need to insert the action name as the first element of the +Array+:
+
+<erb>
+<%= link_to "Edit Ad", [:edit, @magazine, @ad] %>
+</erb>
+
This allows you to treat instances of your models as URLs, and is a key advantage to using the resourceful style.
h4. Adding More RESTful Actions

0 comments on commit f2f556d

Please sign in to comment.
Something went wrong with that request. Please try again.