diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-01-19 09:37:07 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-01-19 09:37:07 +0100 |
commit | f051c2e8131616018486cfb9f4a80a120ca71f6e (patch) | |
tree | b9730f9b3c667c82d66a6cf2dba63cba3fc53361 | |
parent | 8b9206f7d9565ad8b9026e5cc5e085e28ab0117a (diff) |
Fix statsd null backend not being initialized properly
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | Gemfile.lock | 7 | ||||
-rw-r--r-- | app/models/account.rb | 3 | ||||
-rw-r--r-- | config/environments/production.rb | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/Gemfile b/Gemfile index 1341e45de..aa149c61e 100644 --- a/Gemfile +++ b/Gemfile @@ -19,7 +19,7 @@ gem 'dotenv-rails' gem 'font-awesome-rails' gem 'best_in_place', '~> 3.0.1' -gem 'paperclip', '~> 5.0' +gem 'paperclip', '~> 5.1' gem 'paperclip-av-transcoder' gem 'aws-sdk', '>= 2.0' diff --git a/Gemfile.lock b/Gemfile.lock index 7214d21eb..9b33580fc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -76,8 +76,7 @@ GEM bullet (5.3.0) activesupport (>= 3.0.0) uniform_notifier (~> 1.10.0) - climate_control (0.0.3) - activesupport (>= 3.0) + climate_control (0.1.0) cocaine (0.5.8) climate_control (>= 0.0.3, < 1.0) coderay (1.1.1) @@ -89,7 +88,7 @@ GEM execjs coffee-script-source (1.10.0) colorize (0.8.1) - concurrent-ruby (1.0.3) + concurrent-ruby (1.0.4) connection_pool (2.2.1) crack (0.4.3) safe_yaml (~> 1.0.0) @@ -437,7 +436,7 @@ DEPENDENCIES nokogiri oj ostatus2 - paperclip (~> 5.0) + paperclip (~> 5.1) paperclip-av-transcoder pg pg_search diff --git a/app/models/account.rb b/app/models/account.rb index 621a66e24..c2a41c4c6 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -126,7 +126,8 @@ class Account < ApplicationRecord def save_with_optional_avatar! save! rescue ActiveRecord::RecordInvalid - self.avatar = nil + self.avatar = nil + self[:avatar_remote_url] = '' save! end diff --git a/config/environments/production.rb b/config/environments/production.rb index 30170e810..1572eaf6c 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -106,6 +106,6 @@ Rails.application.configure do config.active_record.logger = nil config.to_prepare do - StatsD.backend = StatsD::Instrument::Backends::NullBackend if ENV['STATSD_ADDR'].blank? + StatsD.backend = StatsD::Instrument::Backends::NullBackend.new if ENV['STATSD_ADDR'].blank? end end |