diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2012-02-28 19:07:44 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2012-02-28 19:07:44 +0530 |
commit | f597122b076568356c070ed9bcd83aec29a963eb (patch) | |
tree | 25f950f04a18167329d4f1de0fdd44eea7bd9cd4 /railties/guides/source/routing.textile | |
parent | 699ba8ab52973bf0499643235f162734fb644ab7 (diff) | |
parent | 547e695551e223e4d92762d3c176187e6780e524 (diff) | |
download | rails-f597122b076568356c070ed9bcd83aec29a963eb.tar.gz rails-f597122b076568356c070ed9bcd83aec29a963eb.tar.bz2 rails-f597122b076568356c070ed9bcd83aec29a963eb.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'railties/guides/source/routing.textile')
-rw-r--r-- | railties/guides/source/routing.textile | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile index df2bd9d0c9..24e7d09a49 100644 --- a/railties/guides/source/routing.textile +++ b/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 |