refactor the cli examples in /doc and fix a small bug in todos_controller

This commit is contained in:
Reinier Balt 2013-09-18 17:45:22 +02:00
parent bbf6cdf702
commit 871e18922b
4 changed files with 384 additions and 385 deletions

View file

@ -85,7 +85,8 @@ class TodosController < ApplicationController
p.parse_dates() unless mobile?
tag_list = p.tag_list
@todo = current_user.todos.build(p.attributes)
@todo = current_user.todos.build
@todo.assign_attributes(p.attributes)
p.add_errors(@todo)
if @todo.errors.empty?