Skip to content

Commit

Permalink
Update feed URL to new syntax. [#24]
Browse files Browse the repository at this point in the history
  • Loading branch information
marnen committed May 28, 2009
1 parent 0c0c445 commit 5a9a4e2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/helpers/events_helper.rb
Expand Up @@ -115,7 +115,7 @@ def markdown_hint
# Generates an RSS URL for the current user's events feed.
def rss_url
if User.current_user
formatted_feed_events_url(:format => :rss, :key => User.current_user.feed_key)
feed_events_url(:fmt => :rss, :key => User.current_user.feed_key)
else
nil
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/events/feed.rss.builder
@@ -1,7 +1,7 @@
xml.instruct! :xml, :version => "1.0"
xml.rss :version => '2.0', %s{xmlns:atom} => "http://www.w3.org/2005/Atom" do
xml.channel do
xml.tag! 'atom:link', :href => formatted_feed_events_url(:format => :rss, :key => @key), :rel => :self
xml.tag! 'atom:link', :href => feed_events_url(:fmt => :rss, :key => @key), :rel => :self
xml.title _("%{Quorum} Events") % {:Quorum => SITE_TITLE}
xml.link events_url
xml.description do
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/events_controller_spec.rb
Expand Up @@ -145,7 +145,7 @@

it "should not list any events if given an invalid feed_key" do
User.stub!(:find_by_feed_key).and_return(nil)
get :feed, :format => 'rss', :key => 'fake key'
get :feed, :fmt => 'rss', :key => 'fake key'
Event.should_not_receive(:find)
response.should_not have_tag('item')
end
Expand Down
2 changes: 1 addition & 1 deletion spec/helpers/events_helper_spec.rb
Expand Up @@ -152,7 +152,7 @@
it "should return the RSS feed URL for the current user" do
user = User.make
User.current_user = user
helper.rss_url.should == formatted_feed_events_url(:format => :rss, :key => user.feed_key)
helper.rss_url.should == feed_events_url(:fmt => :rss, :key => user.feed_key)
end

it "should return nil if there is no current user" do
Expand Down

0 comments on commit 5a9a4e2

Please sign in to comment.