From e71d23555e8986263c129bfaa0103adcb50a5b67 Mon Sep 17 00:00:00 2001 From: Devin Weaver Date: Thu, 7 Jun 2012 15:55:26 -0400 Subject: [PATCH] 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. --- app/controllers/projects_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 9fba5216..e5104a49 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -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)