Use respond_to { |format| format.any } to reduce duplication

This commit is contained in:
Mindaugas Mozūras 2013-09-13 14:58:28 +03:00
parent 4ca6114b76
commit 962b4fa5c9
4 changed files with 5 additions and 17 deletions

View file

@ -18,11 +18,7 @@ class ContextsController < ApplicationController
format.html &render_contexts_html
format.m &render_contexts_mobile
format.xml { render :xml => @all_contexts.to_xml( :except => :user_id ) }
format.rss do
@feed_title = 'Tracks Contexts'
@feed_description = "Lists all the contexts for #{current_user.display_name}"
end
format.atom do
format.any(:rss, :atom) do
@feed_title = 'Tracks Contexts'
@feed_description = "Lists all the contexts for #{current_user.display_name}"
end