diff options
| author | hukl <contact@smyck.org> | 2009-09-10 16:42:59 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-09-10 16:42:59 +0200 |
| commit | 4c47711919278fc8f0c3a062dd96615d62d131a3 (patch) | |
| tree | d0f4c3b7841c806997675c0438cb19947c3843d8 | |
| parent | 47944aeae214f2cf9eaa7850fb76ea46287bf028 (diff) | |
and one more tiny modification on the atom feed
| -rw-r--r-- | app/helpers/link_helper.rb | 4 | ||||
| -rw-r--r-- | app/views/rss/updates.xml.builder | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/app/helpers/link_helper.rb b/app/helpers/link_helper.rb index 2d31230..e5fc632 100644 --- a/app/helpers/link_helper.rb +++ b/app/helpers/link_helper.rb | |||
| @@ -9,6 +9,10 @@ module LinkHelper | |||
| 9 | ) | 9 | ) |
| 10 | end | 10 | end |
| 11 | 11 | ||
| 12 | def content_url_helper path_array | ||
| 13 | request.protocol + request.host_with_port + content_path_helper(path_array) | ||
| 14 | end | ||
| 15 | |||
| 12 | def link_to_path title, path, html_options = {} | 16 | def link_to_path title, path, html_options = {} |
| 13 | if params[:page_path] | 17 | if params[:page_path] |
| 14 | active = (params[:page_path].join("/") == path.sub(/^\//, "")) | 18 | active = (params[:page_path].join("/") == path.sub(/^\//, "")) |
diff --git a/app/views/rss/updates.xml.builder b/app/views/rss/updates.xml.builder index 57a0f42..3cca944 100644 --- a/app/views/rss/updates.xml.builder +++ b/app/views/rss/updates.xml.builder | |||
| @@ -17,7 +17,7 @@ xml.feed(:xmlns => "http://www.w3.org/2005/Atom", "xml:base" => @host) do | |||
| 17 | :href => content_path_helper(item.node.unique_path), | 17 | :href => content_path_helper(item.node.unique_path), |
| 18 | :rel => "alternate" | 18 | :rel => "alternate" |
| 19 | ) | 19 | ) |
| 20 | xml.id(content_path_helper(item.node.unique_path)) | 20 | xml.id(content_url_helper(item.node.unique_path)) |
| 21 | xml.updated(item.updated_at.xmlschema) | 21 | xml.updated(item.updated_at.xmlschema) |
| 22 | xml.content(:type => "xhtml") do | 22 | xml.content(:type => "xhtml") do |
| 23 | xml.div(item.body, :xmlns => "http://www.w3.org/1999/xhtml") | 23 | xml.div(item.body, :xmlns => "http://www.w3.org/1999/xhtml") |
