Fixes a crash when using the XML API

The use of "http://localhost/projects.xml" would crash with missing
method 'all' for object 'Array'

This is because the variable @projects did not need to use all in the
XML formatting since it was already assigned above and is now an array.
This commit is contained in:
Devin Weaver 2012-06-07 15:55:26 -04:00
parent c2d627bb43
commit e71d23555e

View file

@ -37,7 +37,7 @@ class ProjectsController < ApplicationController
@down_count = @active_projects.size + @hidden_projects.size + @completed_projects.size
cookies[:mobile_url]= {:value => request.fullpath, :secure => SITE_CONFIG['secure_cookies']}
end
format.xml { render :xml => @projects.all.to_xml( :except => :user_id ) }
format.xml { render :xml => @projects.to_xml( :except => :user_id ) }
format.rss do
@feed_title = I18n.t('models.project.feed_title')
@feed_description = I18n.t('models.project.feed_description', :username => current_user.display_name)