summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-02-22 07:31:20 -0700
committermo khan <mo@mokhan.ca>2014-02-22 07:31:20 -0700
commit85009727fccd91a27c658993417ca2d3b50c2364 (patch)
treea7d9b2d21d23d54770cd78c027699eea43af133d /app
parent10d812064f745c4d11eeba91daf3376e608f0c6f (diff)
add json response for licenses#show.
Diffstat (limited to 'app')
-rw-r--r--app/views/v1/licenses/show.jbuilder14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/views/v1/licenses/show.jbuilder b/app/views/v1/licenses/show.jbuilder
index 98f59e8..6ada656 100644
--- a/app/views/v1/licenses/show.jbuilder
+++ b/app/views/v1/licenses/show.jbuilder
@@ -1,2 +1,16 @@
+json.id @license.id
+json.well_type do
+ json.id @license.well_type.id
+ json.acronym @license.well_type.acronym
+ json.name @license.well_type.name
+end
+json.location do
+ json.township @license.location.township
+ json.latitude @license.location.latitude
+ json.longitude @license.location.longitude
+end
+json.company do
+ json.name @license.company.name
+end
json.issued_at @license.issued_at.to_s
json.expired_at @license.expired_at.to_s