summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-02-22 07:40:29 -0700
committermo khan <mo@mokhan.ca>2014-02-22 07:40:29 -0700
commit010bd343157ae02c95709359f0137d45e562e629 (patch)
tree0c6912ac0756f193c5a18c770e8e233a17f8919c /app/views
parent455c4f06a54b02dacbc5f93d437d07689dc03fc1 (diff)
extract partial for location.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/v1/licenses/_license.json.jbuilder6
-rw-r--r--app/views/v1/licenses/_location.json.jbuilder5
2 files changed, 6 insertions, 5 deletions
diff --git a/app/views/v1/licenses/_license.json.jbuilder b/app/views/v1/licenses/_license.json.jbuilder
index 58b9282..607ce60 100644
--- a/app/views/v1/licenses/_license.json.jbuilder
+++ b/app/views/v1/licenses/_license.json.jbuilder
@@ -1,10 +1,6 @@
json.id license.id
json.partial! 'v1/licenses/well_type', well_type: license.well_type
- json.location do
- json.township license.location.township
- json.latitude license.location.latitude
- json.longitude license.location.longitude
- end
+ json.partial! 'v1/licenses/location', location: license.location
json.company do
json.name license.company.name
end
diff --git a/app/views/v1/licenses/_location.json.jbuilder b/app/views/v1/licenses/_location.json.jbuilder
new file mode 100644
index 0000000..5b43756
--- /dev/null
+++ b/app/views/v1/licenses/_location.json.jbuilder
@@ -0,0 +1,5 @@
+json.location do
+ json.township location.township
+ json.latitude location.latitude
+ json.longitude location.longitude
+end