Fix atom feed urls. Refs #396

This commit is contained in:
Pavel Chipiga 2012-04-19 20:35:35 +03:00
parent 02095e62c1
commit 5efabc9d4e
2 changed files with 7 additions and 5 deletions

View File

@ -10,7 +10,7 @@
= csrf_meta_tag
= display_meta_tags :site => APP_CONFIG['project_name'], :reverse => true, :separator => '-'
- if user_signed_in?
= auto_discovery_link_tag :atom, root_path(:format => 'atom', :token => current_user.authentication_token), :title => t("layout.atom_link_tag_title", :nickname => current_user.name, :app_name => APP_CONFIG['project_name'])
= auto_discovery_link_tag :atom, atom_activity_feeds_url(:format => 'atom', :token => current_user.authentication_token), :title => t("layout.atom_link_tag_title", :nickname => current_user.name, :app_name => APP_CONFIG['project_name'])
%body
.wrap{:class => content_for?(:sidebar) ? 'columns' : ''}

View File

@ -179,15 +179,17 @@ Rosa::Application.routes.draw do
resources :event_logs, :only => :index
match '/forbidden', :to => 'pages#forbidden', :as => 'forbidden'
match '/terms-of-service', :to => 'pages#tos', :as => 'tos'
get '/forbidden' => 'pages#forbidden', :as => 'forbidden'
get '/terms-of-service' => 'pages#tos', :as => 'tos'
get '/activity_feeds.:format' => 'activity_feeds#index', :as => 'atom_activity_feeds', :format => /atom/
if APP_CONFIG['anonymous_access']
authenticated do
get "/(.:format)" => "activity_feeds#index", :as => :root
root :to => 'activity_feeds#index'
end
root :to => 'pages#root'
else
get "/(.:format)" => "activity_feeds#index", :as => :root
root :to => 'activity_feeds#index'
end
end