From e193ff0e30452e56c4ae3b3c5b3b50e3c691cfa7 Mon Sep 17 00:00:00 2001 From: derek-b Date: Wed, 17 Jan 2018 10:25:41 -0600 Subject: [PATCH] Update services.adoc with show method line numbers --- src/main/docs/guide/services.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/docs/guide/services.adoc b/src/main/docs/guide/services.adoc index 1499673..6d0d205 100644 --- a/src/main/docs/guide/services.adoc +++ b/src/main/docs/guide/services.adoc @@ -63,7 +63,7 @@ Now (still editing `VehicleController.groovy`), modify the `show` action as seen [source,groovy] .grails-app/controllers/org/grails/guides/VehicleController.groovy ---- -include::{sourceDir}/grails-app/controllers/org/grails/guides/VehicleController.groovy[indent=0,lines="18..20"] +include::{sourceDir}/grails-app/controllers/org/grails/guides/VehicleController.groovy[indent=0,lines="22..24"] ---- We've added new property to the `model`, called `estimatedValue`. The value of this property is the result of calling our service method, `getEstimate`, to which we pass the `vehicle` property we are about to render. @@ -77,4 +77,4 @@ include::{sourceDir}/grails-app/views/vehicle/show.gsp[indent=0,lines="17..20"] ---- <1> `` is another GSP tag which provides many useful options for rendering numbers, including currency and decimal precision. See the http://docs.grails.org/latest/ref/Tags/formatNumber.html[Grails documentation] for more. -Restart the application and browse to the show page for a `Vehicle`, such as `http://localhost:8080/vehicle/show/1`. You should see the "Estimated Value" on the page \ No newline at end of file +Restart the application and browse to the show page for a `Vehicle`, such as `http://localhost:8080/vehicle/show/1`. You should see the "Estimated Value" on the page