Skip to content

Commit

Permalink
change column sort
Browse files Browse the repository at this point in the history
  • Loading branch information
chrhsmt committed Jan 28, 2014
1 parent 1ab3dbe commit 885933e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/data_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ def download
json = JSON.parser.new(open(url).read)

# generate csv data
header = %w(エリア 地名 設置場所)
header = %w(エリア 住所 住所詳細)
csvData = CSV.generate(headers: header, write_headers: true, force_quotes: true) do | csv |
json.parse['issues'].each do | issue |
csv << [issue['category']['name'], issue['subject'], issue['description']] #, issue['geometry']["coordinates"]
csv << [issue['category']['name'], issue['description'], issue['subject']] #, issue['geometry']["coordinates"]
end
end
csvData.encode(Encoding::SJIS)
Expand Down

0 comments on commit 885933e

Please sign in to comment.