From 3e389a86c604017632c8c3dd155c50fba72580e9 Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Thu, 4 Sep 2014 01:26:57 +0200 Subject: [PATCH] Pass &:to_f as an argument to collect instead of a block --- Gemfile.lock | 5 ++++- app/models/address.rb | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 697c63b..cd335b3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -30,6 +30,8 @@ GEM addressable (2.3.6) arel (5.0.1.20140414130214) ast (2.0.0) + astrolabe (1.3.0) + parser (>= 2.2.0.pre.3, < 3.0) bcrypt (3.1.7) builder (3.2.2) coderay (1.1.0) @@ -147,7 +149,8 @@ GEM rest-client (1.7.2) mime-types (>= 1.16, < 3.0) netrc (~> 0.7) - rubocop (0.25.0) + rubocop (0.26.0) + astrolabe (~> 1.3) parser (>= 2.2.0.pre.4, < 3.0) powerpack (~> 0.0.6) rainbow (>= 1.99.1, < 3.0) diff --git a/app/models/address.rb b/app/models/address.rb index 087cb7e..17ea065 100644 --- a/app/models/address.rb +++ b/app/models/address.rb @@ -2,6 +2,6 @@ class Address include Geokit::Geocoders def self.geocode(address) - MultiGeocoder.geocode(address).ll.split(',').collect { |s| s.to_f } + MultiGeocoder.geocode(address).ll.split(',').collect(&:to_f) end end