From 30440288d9544959a9d8631c9f7f716adbc57fa4 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Mon, 30 Jan 2012 12:57:56 +0100 Subject: [PATCH] Updated views to use the instance vars and no longer rely on Markaby's method_missing --- stoptime.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stoptime.rb b/stoptime.rb index 3d7c5a9..2d17e9c 100644 --- a/stoptime.rb +++ b/stoptime.rb @@ -1407,7 +1407,7 @@ module StopTime::Views # FIXME: This should be done in a nicer way. def time_entries(task_id=nil) if task_id.present? - h2 "Registered #{task.billed? ? "billed" : "unbilled"} time" + h2 "Registered #{@task.billed? ? "billed" : "unbilled"} time" else h2 "Timeline" end @@ -1497,7 +1497,7 @@ module StopTime::Views "what you are doing!" end end - form :action => R(*target), :method => :post do + form :action => R(*@target), :method => :post do ol do li do label "Customer", :for => "customer" @@ -1651,7 +1651,7 @@ module StopTime::Views p.warn do em "This task is already billed! Only make changes if you know " + "what you are doing!" - end if task.billed? + end if @task.billed? form :action => R(*@target), :method => :post do ol do li do @@ -1673,7 +1673,7 @@ module StopTime::Views end end end - if task.billed? + if @task.billed? li do label "Billed in invoice" a @task.invoice.number, @@ -1760,7 +1760,7 @@ module StopTime::Views tr do td do a task.comment_or_name, - :href => R(CustomersNTasksN, customer.id, task.id) + :href => R(CustomersNTasksN, task.customer.id, task.id) end if line[1].blank? # FIXME: information of time spent is available in the summary