public
Description: This contains various plugins for Feather
Clone URL: git://github.com/eldiablo/feather-plugins.git
Click here to lend your support to: feather-plugins and make a donation at www.pledgie.com !
set the correct content-type for feeds
granth (author)
Sun May 18 11:31:13 -0700 2008
commit  d12ccc1144d1886cc9e203fbb58121a383dec57c
tree    2044695f00dfdf377262070015c841fb2017f757
parent  92e29341d3958a892267414763d377a7463f8937
...
8
9
10
 
11
12
13
...
27
28
29
 
30
31
32
...
8
9
10
11
12
13
14
...
28
29
30
31
32
33
34
0
@@ -8,6 +8,7 @@ class Feeds < Application
0
     xml.instruct!
0
     case params[:format]
0
     when "rss"
0
+ content_type :rss
0
       xml.rss "version" => "2.0" do
0
         xml.channel do
0
           xml.title Configuration.current.title
0
@@ -27,6 +28,7 @@ class Feeds < Application
0
         end
0
       end
0
     when "atom"
0
+ content_type :atom
0
       xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
0
         xml.title Configuration.current.title
0
         xml.subtitle Configuration.current.tag_line
...
20
21
22
23
24
 
 
 
 
...
20
21
22
 
23
24
25
26
27
0
@@ -20,4 +20,7 @@ end
0
 Hooks::View.register_partial_view "head", "feed_link"
0
 Hooks::View.register_partial_view "sidebar", "feed_link"
0
 
0
-Hooks::Menu.add_menu_item "Feed Settings", "/admin/feed_settings"
0
\ No newline at end of file
0
+Hooks::Menu.add_menu_item "Feed Settings", "/admin/feed_settings"
0
+
0
+Merb.add_mime_type(:atom, nil, %w[application/atom+xml], :charset => "utf-8")
0
+Merb.add_mime_type(:rss, nil, %w[application/rss+xml], :charset => "utf-8")

Comments

    No one has commented yet.