summaryrefslogtreecommitdiff
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
parent455c4f06a54b02dacbc5f93d437d07689dc03fc1 (diff)
extract partial for location.
-rw-r--r--README.md1
-rw-r--r--app/views/v1/licenses/_license.json.jbuilder6
-rw-r--r--app/views/v1/licenses/_location.json.jbuilder5
3 files changed, 7 insertions, 5 deletions
diff --git a/README.md b/README.md
index 2727bdb..e8076f5 100644
--- a/README.md
+++ b/README.md
@@ -102,6 +102,7 @@ LicenseStatus (flyweight, state)
* finish json views
* add well statuses and well types to json response.
* rename license to well license
+* add applicant name to users
* update deploy script to seed db.
* update license status to use a hash
* add pagination to company licenses controller
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