get tag view working for updating todos. Refactored update a lot

This commit is contained in:
Reinier Balt 2011-01-01 18:55:53 +01:00
parent 1cea27ccc9
commit f923a40a40
15 changed files with 314 additions and 215 deletions

View file

@ -124,7 +124,7 @@ module LoginSystem
def get_current_user
if @user.nil? && session['user_id']
@user = User.find session['user_id'], :include => :preference
@user = User.find(session['user_id'], :include => [:preference])
end
@prefs = @user.prefs unless @user.nil?
@user

View file

@ -1,5 +1,6 @@
module Tracks
module TodoList
# TODO: this module should be deprecated. This could mostly (all?) be replaced by named scopes)
def not_done_todos(opts={})
@not_done_todos ||= self.find_not_done_todos(opts)