fix regression and further cleanups of todo model

This commit is contained in:
Reinier Balt 2011-11-16 19:36:09 +01:00
parent 906ff11633
commit 833297b355
2 changed files with 17 additions and 26 deletions

View file

@ -1517,7 +1517,7 @@ class TodosController < ApplicationController
@prefs = prefs
@attributes = params['request'] && params['request']['todo'] || params['todo']
if @attributes[:tags]
if @attributes && @attributes[:tags]
# the REST api may use <tags> which will collide with tags association, so rename tags to add_tags
add_tags = @attributes[:tags]
@attributes.delete :tags