diff options
author | Henare Degan <henare.degan@gmail.com> | 2015-04-11 17:11:09 +1000 |
---|---|---|
committer | Henare Degan <henare.degan@gmail.com> | 2015-04-11 17:11:09 +1000 |
commit | 711e42fadcce6c94e4b325276a1e35e2be18a526 (patch) | |
tree | daf4db53b43c0a04529a12c1e198cce2dcd2f980 /app/models | |
parent | b29b74b7cb9e3f32d2f66c0432030c828951a707 (diff) |
Make method more concise
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/public_body.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb index 8f0890b2b..cb412f9dc 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -774,10 +774,7 @@ class PublicBody < ActiveRecord::Base end def empty_translation_in_params?(attributes) - attrs_with_values = attributes.select do |key, value| - !value.blank? && key.to_s != 'locale' - end - attrs_with_values.empty? + attributes.select { |k, v| !v.blank? && k.to_s != 'locale' }.empty? end def request_email_if_requestable |