small refactorings

fix passing params in use of _collection
This commit is contained in:
Reinier Balt 2013-05-03 21:54:03 +02:00
parent f891ee86fe
commit 5cfa115cdc
8 changed files with 54 additions and 30 deletions

View file

@ -367,6 +367,10 @@ class Todo < ActiveRecord::Base
end
end
def has_project?
return ! (project_id.nil? || project.is_a?(NullProject))
end
# used by the REST API. <tags> will also work, this is renamed to add_tags in TodosController::TodoCreateParamsHelper::initialize
def add_tags=(params)
unless params[:tag].nil?