Skip to content

Commit

Permalink
Merge branch 'master' into demographics
Browse files Browse the repository at this point in the history
Conflicts:
	app/app.rb
	db/schema.rb
  • Loading branch information
bbttxu committed Mar 4, 2017
2 parents caa62f7 + 3d10f67 commit 24e4ae1
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ For examples below, the Resource ID is `5980ea98-ce00-4f7d-9ee3-114006f78f59` an
1. `load 'app/data_saver.rb'`
1. `DataSaver.save_all('5980ea98-ce00-4f7d-9ee3-114006f78f59', 'gas_well_inspections')`

In Code

1. Add Dataset Endpoint

Files

1. Stage `app/app.rb` and `schema.rb`
Expand Down
17 changes: 9 additions & 8 deletions app/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
VoterDistrict.import
Billboard.import
School.import
WellInspection.import
DentonHouse.import
HomelessnessSurvey.import
Demographic.import
Expand All @@ -42,7 +41,6 @@
VoterDistrict.delete_all
Billboard.delete_all
School.delete_all
WellInspection.delete_all
DentonHouse.delete_all
HomelessnessSurvey.destroy_all
Demographic.destroy_all
Expand Down Expand Up @@ -84,13 +82,16 @@
end.to_json
end

###################
# Well Inspection #
###################
#######################
# Gas Well Inspection #
#######################

get '/gas-well-inspections' do
GasWellInspection.all.select( 'id, x, y, siteaddres, fullname, lastinspectiondate, status' ).to_json
end

get '/well-inspections' do
inspections = WellInspection.order(objectid: :asc)
"Number of entries: #{inspections.count}<br>#{inspections.map { |i| i.objectid }}!"
get '/gas-well-inspections/:id' do
GasWellInspection.where(id: params[:id]).to_json
end

################
Expand Down
11 changes: 0 additions & 11 deletions app/models/well_inspection.rb

This file was deleted.

9 changes: 9 additions & 0 deletions db/migrate/20170304180000_delete_well_inspections.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class DeleteWellInspections < ActiveRecord::Migration[5.0]
def up
drop_table :well_inspections
end

def down
raise ActiveRecord::IrreversibleMigration
end
end

0 comments on commit 24e4ae1

Please sign in to comment.