1 class FeedController
< ApplicationController
3 skip_before_filter
:verify_authenticity_token
6 @feeds = FeedItem
.find(:all, :select => 'DISTINCT feed_name')
9 format
.rss
{ render
:layout => false }
14 @feed_items = FeedItem
.find_all_by_feed_name(params
[:feed_name])
15 redirect_to index_url
if @feed_items == []
16 respond_to
do |format
|
18 format
.rss
{ render
:layout => false }
23 item
= FeedItem
.find_by_feed_name_and_title(params
[:feed_name], params
[:title])
25 if params
[:description] == ''
28 item
.update_attribute(:description, params
[:description])
31 FeedItem
.create(:feed_name => params
[:feed_name],
32 :title => params
[:title],
33 :description => params
[:description])
35 redirect_to
feed_url(params
[:feed_name])