You are here: Forums Ask a Rails expert RSS...
Posted in Forums : Ask a Rails expert
Authority 37
Posting Rating 77
Sign in to rate this post
|
i am using rails 2.1.0 i am very cleared about RSS topic but ->how to install rss gems and from where ? ->where to start is again a big confusion ? |
Authority 12
Posting Rating 98
Sign in to rate this post
|
Depends on what you needed done. Do you need to parse a RSS feed? Or do you want to generate your own RSS feed? |
Authority 37
Posting Rating 77
Sign in to rate this post
|
->how to install rss gems and from where ?(if it is needed ) I need to generate my own RSS feed |
Authority 12
Posting Rating 98
Sign in to rate this post
|
Have you tried the tutorial here ? |
Authority 37
Posting Rating 77
Sign in to rate this post
|
i tried but can’t could you please explain in detail |
Authority 62
Posting Rating 100
Sign in to rate this post
|
This tutorial is old and outdated – you should use a modern REST approach. What you need is basically: |
Authority 37
Posting Rating 77
Sign in to rate this post
|
where to add format.rss (or format.atom). |
Authority 12
Posting Rating 98
Sign in to rate this post
|
You add it in your controller code, inside the action which would render the feed. |
Authority 37
Posting Rating 77
Sign in to rate this post
|
in controllers i added
‘feed’ and ‘rss’
as actions |
Authority 12
Posting Rating 98
Sign in to rate this post
|
You don’t need to add a feed or rss actions in your controller. You can just add it to your index action. Lets assume you have a Post model and PostsController as an example. class PostsController < ApplicationController def index end Create an app/views/posts/index.atom.builder file which contains the following: atom_feed do |feed| for post in @posts entry.author do |author| |
Ask a Rails expert : How to work with ror 2.1.1 using Netbeans IDE 6.1
Ask a Rails expert : json gem error
Ask a Rails expert : Problem with break
Ask a Rails expert : activesupport string first method error
Ask a Rails expert : url_for broken ?
Ask a Rails expert : map.routes.rb pls help
Ask a Rails expert : how to h tag in controller
Ask a Rails expert : Problem with Restful routing and partial form
Ask a Rails expert : will_paginate, search and ajax