Permalink
Browse files

image feed error

  • Loading branch information...
1 parent 37431bc commit e60aaf54471f2d28e87ae3186e5d4a14051d3ea0 @micahbrich committed Nov 25, 2009
Showing with 2 additions and 24 deletions.
  1. +0 −5 app/controllers/posts_controller.rb
  2. +1 −19 app/views/posts/image_feed.rxml
  3. +1 −0 config/routes.rb
@@ -40,11 +40,6 @@ def feed
def image_feed
@posts = Post.find_desc(:limit => 10)
- respond_to do |format|
- # format.html # show.html.erb
- format.xml { render :xml => @post }
- format.rss { render :nothing => true }
- end
end
def show
@@ -1,19 +1 @@
-xml.instruct! :xml, :version=>"1.0"
-xml.rss(:version=>"2.0"){
- xml.channel{
- xml.title(@site_name)
- xml.link(@site_address)
- xml.description(@site_description)
- xml.language('en-us')
- for post in @posts
- xml.item do
- xml.title(post.title)
- xml.description(image_tag(post.image))
- xml.author(@author)
- xml.pubDate(post.created_at.strftime("%a, %d %b %Y %H:%M:%S %z"))
- xml.link(post_path(post))
- xml.guid(post_path(post))
- end
- end
- }
-}
+hi
View
@@ -5,6 +5,7 @@
# Sample of regular route:
map.archive '/archive', :controller => 'posts', :action => 'archive'
map.feed '/feed', :controller => 'posts', :action => 'feed'
+ map.feed '/imagefeed', :controller => 'posts', :action => 'image_feed'
map.feed '/imagefeed.:format', :controller => 'posts', :action => 'image_feed'
map.feed '/feed.:format', :controller => 'posts', :action => 'feed'
map.about '/about', :controller => 'posts', :action => 'about'

0 comments on commit e60aaf5

Please sign in to comment.