Fix value class issue in task form preseeding

This commit is contained in:
Paul van Tilburg 2011-11-29 16:21:09 +01:00
parent bd45416675
commit aa35d43986

View file

@ -641,7 +641,7 @@ module StopTime::Controllers
@task = Task.new(:hourly_rate => @customer.hourly_rate) @task = Task.new(:hourly_rate => @customer.hourly_rate)
@input = @task.attributes @input = @task.attributes
@input["type"] = @task.type # FIXME: find nicer way! @input["type"] = @task.type # FIXME: find nicer way!
@input["customer"] = customer_id @input["customer"] = @customer.id
@target = [CustomersNTasks, customer_id] @target = [CustomersNTasks, customer_id]
@method = "create" @method = "create"
@ -670,7 +670,7 @@ module StopTime::Controllers
@method = "update" @method = "update"
@input = @task.attributes @input = @task.attributes
@input["type"] = @task.type @input["type"] = @task.type
@input["customer"] = customer_id @input["customer"] = @customer.id
# FIXME: Check that task is of that customer. # FIXME: Check that task is of that customer.
render :task_form render :task_form
end end