diff options
| author | hukl <contact@smyck.org> | 2009-11-14 10:42:21 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-11-14 10:42:21 +0100 |
| commit | 14e3a355fb4c68cc6ab8d123e107e65b8511bd6f (patch) | |
| tree | d7f32a51cf9c42e47bcb84f063db69b26310fb85 | |
| parent | f713926e7174ca2271b5ab29600e9475a976d69e (diff) | |
nodes :show now also includes a direct link to to the live version of the node. Additionally, I changed the default route to a named route so it is much easier to generate proper public paths and urls.
| -rw-r--r-- | app/views/nodes/show.html.erb | 4 | ||||
| -rw-r--r-- | config/routes.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/views/nodes/show.html.erb b/app/views/nodes/show.html.erb index c077f6a..de4d8a2 100644 --- a/app/views/nodes/show.html.erb +++ b/app/views/nodes/show.html.erb | |||
| @@ -9,8 +9,8 @@ | |||
| 9 | <div id="page_editor" class="show_node"> | 9 | <div id="page_editor" class="show_node"> |
| 10 | <table id="content"> | 10 | <table id="content"> |
| 11 | <tr> | 11 | <tr> |
| 12 | <td class="description">Path</td> | 12 | <td class="description">Public Link</td> |
| 13 | <td><%= @page.public_link %></td> | 13 | <td><%= link_to @page.public_link, content_url(@node.unique_path) %></td> |
| 14 | </tr> | 14 | </tr> |
| 15 | <tr> | 15 | <tr> |
| 16 | <td class="description">Author</td> | 16 | <td class="description">Author</td> |
diff --git a/config/routes.rb b/config/routes.rb index 9b5980b..c2590bd 100644 --- a/config/routes.rb +++ b/config/routes.rb | |||
| @@ -33,6 +33,6 @@ ActionController::Routing::Routes.draw do |map| | |||
| 33 | map.connect 'galleries/*page_path', | 33 | map.connect 'galleries/*page_path', |
| 34 | :controller => 'content', :action => 'render_gallery' | 34 | :controller => 'content', :action => 'render_gallery' |
| 35 | 35 | ||
| 36 | map.connect '/*page_path', | 36 | map.content '/*page_path', |
| 37 | :controller => 'content', :action => 'render_page' | 37 | :controller => 'content', :action => 'render_page' |
| 38 | end | 38 | end |
