Skip to content

Commit

Permalink
db/seeds.rb: Give restroom entries an edit_id (#567)
Browse files Browse the repository at this point in the history
Only applies during development and testing
when we use the "db/export.csv" data.

Doesn't affect production, which uses the real data in its db.
  • Loading branch information
DeeDeeG authored Mar 31, 2019
1 parent 4d2a0f0 commit b1cc32b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

Restroom.transaction do
CSV.foreach('db/export.csv') do |row|
Restroom.create(
restroom = Restroom.create(
:name => row[1],
:street => row[3],
:city => row[4],
Expand All @@ -23,5 +23,6 @@
:longitude => row[9],
:country => row[6]
)
restroom.update(edit_id: restroom.id)
end
end
end

0 comments on commit b1cc32b

Please sign in to comment.