mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-24 09:46:11 +01:00
home page is restored, so is context view
This commit is contained in:
parent
4605b17d3c
commit
e964769553
130 changed files with 89 additions and 152 deletions
|
|
@ -263,7 +263,7 @@ class ContextsController < ApplicationController
|
|||
end
|
||||
|
||||
def set_context_from_params
|
||||
@context = current_user.contexts.find_by_params(params)
|
||||
@context = current_user.contexts.find(params[:id])
|
||||
rescue
|
||||
@context = nil
|
||||
end
|
||||
|
|
@ -276,11 +276,8 @@ class ContextsController < ApplicationController
|
|||
def init_todos
|
||||
set_context_from_params
|
||||
unless @context.nil?
|
||||
@context.todos.send :with_scope, :find => { :include => Todo::DEFAULT_INCLUDES } do
|
||||
@done = @context.done_todos
|
||||
end
|
||||
|
||||
@max_completed = current_user.prefs.show_number_completed
|
||||
@done = @context.todos.completed.all(:limit => @max_completed)
|
||||
|
||||
# @not_done_todos = @context.not_done_todos TODO: Temporarily doing this
|
||||
# search manually until I can work out a way to do the same thing using
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue