Merge pull request #84 from sukima/fix_projects_api_crash

Fix projects api crash
This commit is contained in:
Reinier Balt 2012-07-11 06:36:51 -07:00
commit 23b92d853a
2 changed files with 34 additions and 2 deletions

View file

@ -31,14 +31,13 @@ class ProjectsController < ApplicationController
@completed_count = current_user.projects.completed.count
@no_projects = current_user.projects.empty?
current_user.projects.cache_note_counts
@new_project = current_user.projects.build
end
format.m do
@completed_projects = current_user.projects.completed
@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)