Fix value class issue in task form preseeding
This commit is contained in:
parent
bd45416675
commit
aa35d43986
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue