mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-07 09:48:50 +01:00
Try the cache_digests gem for Tracks
cache_digests will be part of Rails 4
This commit is contained in:
parent
8b1fc99b72
commit
8a8dc47ab8
9 changed files with 134 additions and 105 deletions
|
|
@ -50,23 +50,20 @@ class ContextsController < ApplicationController
|
|||
@pending = @context.todos.pending.includes(Todo::DEFAULT_INCLUDES)
|
||||
|
||||
@projects = current_user.projects
|
||||
@contexts = current_user.contexts
|
||||
|
||||
@count = @not_done_todos.count + @deferred.count + @pending.count
|
||||
end
|
||||
|
||||
@contexts = current_user.contexts(true)
|
||||
if @context.nil?
|
||||
respond_to do |format|
|
||||
format.html { render :text => 'Context not found', :status => 404 }
|
||||
format.xml { render :xml => '<error>Context not found</error>', :status => 404 }
|
||||
end
|
||||
else
|
||||
@page_title = "TRACKS::Context: #{@context.name}"
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.m &render_context_mobile
|
||||
format.xml { render :xml => @context.to_xml( :except => :user_id ) }
|
||||
end
|
||||
else
|
||||
respond_to do |format|
|
||||
format.html { render :text => 'Context not found', :status => 404 }
|
||||
format.xml { render :xml => '<error>Context not found</error>', :status => 404 }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue