NoMethodError in TaskController#mark_complete

Subscribe to NoMethodError in TaskController#mark_complete 3 post(s), 2 voice(s)

 
Avatar Hunt Norment 2 post(s)

Just added the mark_complete method to the task controller and get this error message every time. Here is the snippet:

def mark_complete if @task.complete.nil? @task.complete = Time.now <- this line is the culprit -> @task.todo.move_to_bottom else @task.complete = nil end @task.save! redirect_to :controller => :today, :action => :index end

It must be something syntactical. Any ideas?

 
Avatar Hunt Norment 2 post(s)

fixed. never mind. except i notice that when I mark a task as complete, I need to click the browser refresh button to strike it and move it to the bottom. I also notice in the console that the complete variable is always null.

 
Avatar EldonAlameda Administrator 216 post(s)

Adding link to an Rails 2.3.5 version of the Monkey Tasks project – you might want to check it’s source out and compare it against yours.