fix #1229. Thanks popsch for the testscript and the initial pull request

This commit is contained in:
Reinier Balt 2012-03-19 20:04:56 +01:00
parent 322248963b
commit c7e68aa8b6
2 changed files with 41 additions and 2 deletions

View file

@ -340,7 +340,10 @@ class Todo < ActiveRecord::Base
# used by the REST API. <tags> will also work, this is renamed to add_tags in TodosController::TodoCreateParamsHelper::initialize
def add_tags=(params)
tag_with params[:tag].inject([]) { |list, value| list << value[:name] } unless params[:tag].nil?
unless params[:tag].nil?
tag_list = params[:tag].inject([]) { |list, value| list << value[:name] }
tag_with tag_list.join(", ")
end
end
# Rich Todo API