Skip to content
Snippets Groups Projects
Commit c12b1f39 authored by Alex Reisner's avatar Alex Reisner
Browse files

Fix broken Query#blank? method.

parent 88861644
No related branches found
No related tags found
No related merge requests found
......@@ -42,8 +42,9 @@ module Geocoder
# no URL parameters are specified.
#
def blank?
!!text.to_s.match(/^\s*$/) and (
!options[:params].is_a?(Hash) or options[:params].keys.size == 0
!params_given? and (
(text.is_a?(Array) and text.compact.size < 2) or
text.to_s.match(/^\s*$/)
)
end
......@@ -88,5 +89,11 @@ module Geocoder
def reverse_geocode?
coordinates?
end
private # ----------------------------------------------------------------
def params_given?
!!(options[:params].is_a?(Hash) and options[:params].keys.size > 0)
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment