diff options
| author | mo khan <mo@mokhan.ca> | 2014-02-22 07:40:29 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-02-22 07:40:29 -0700 |
| commit | 010bd343157ae02c95709359f0137d45e562e629 (patch) | |
| tree | 0c6912ac0756f193c5a18c770e8e233a17f8919c | |
| parent | 455c4f06a54b02dacbc5f93d437d07689dc03fc1 (diff) | |
extract partial for location.
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | app/views/v1/licenses/_license.json.jbuilder | 6 | ||||
| -rw-r--r-- | app/views/v1/licenses/_location.json.jbuilder | 5 |
3 files changed, 7 insertions, 5 deletions
@@ -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 |
