Skip to content

Commit

Permalink
Missed this during a gross merge conflict.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Pelletier committed Mar 31, 2016
1 parent 12371ed commit d0f2b4c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 10 deletions.
6 changes: 3 additions & 3 deletions app/controllers/api/api_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ def dashboard()
end

begin
current_income_list = Income.where(round: round).pluck(:team_name, :amount)
previous_income_list = Income.where(round: (round -1)).pluck_to_hash(:team_name, :amount).group_by{|x| x[:team_name]}
current_income_list = @games.incomes.where(round: round).pluck(:team_name, :amount)
previous_income_list = @games.incomes.where(round: (round -1)).pluck_to_hash(:team_name, :amount).group_by{|x| x[:team_name]}

countries_data = current_income_list.map do |country, amount|
previous_income = previous_income_list[country]

income_change = if previous_income.empty?
income_change = if previous_income.nil? or previous_income.empty?
amount
else
amount - previous_income[0][:amount]
Expand Down
1 change: 0 additions & 1 deletion app/models/game.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def update()
self.round +=1
self.next_round = self.next_round + (30*60)
self.save

#Group Twitter activities together and dump cleanly into the error bucket on fail
begin
Tweet.import
Expand Down
4 changes: 1 addition & 3 deletions app/models/tweet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ class Tweet < ActiveRecord::Base

def publish(client)
require 'open-uri'
# if self.is_public && !self.is_published
# Disble tweeting
if false
if self.is_public && !self.is_published
# Need to add source + char, limit.
# GNN:
# DEN:
Expand Down
2 changes: 1 addition & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Application < Rails::Application
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
config.assets.paths << Rails.root.join('vendor', 'assets', 'components')
config.time_zone = 'Central Time (US & Canada)'
config.time_zone = 'Eastern Time (US & Canada)'
config.active_record.default_timezone = :local
config.serve_static_files = true
end
Expand Down
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false

config.time_zone = "Pacific Time (US & Canada)"
config.time_zone = 'Eastern Time (US & Canada)'
config.assets.precompile << /\.(?:svg|eot|woff|ttf)\z/
end
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20160228112423) do
ActiveRecord::Schema.define(version: 20160320220659) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand Down

0 comments on commit d0f2b4c

Please sign in to comment.