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

Merge pull request #733 from dgilperez/master

Add table_name to AR geocoded and not_geocoded scopes
parents 381c289f d1ecc2e1
Branches
Tags
No related merge requests found
...@@ -18,14 +18,14 @@ module Geocoder::Store ...@@ -18,14 +18,14 @@ module Geocoder::Store
# scope: geocoded objects # scope: geocoded objects
scope :geocoded, lambda { scope :geocoded, lambda {
where("#{geocoder_options[:latitude]} IS NOT NULL " + where("#{table_name}.#{geocoder_options[:latitude]} IS NOT NULL " +
"AND #{geocoder_options[:longitude]} IS NOT NULL") "AND #{table_name}.#{geocoder_options[:longitude]} IS NOT NULL")
} }
# scope: not-geocoded objects # scope: not-geocoded objects
scope :not_geocoded, lambda { scope :not_geocoded, lambda {
where("#{geocoder_options[:latitude]} IS NULL " + where("#{table_name}.#{geocoder_options[:latitude]} IS NULL " +
"OR #{geocoder_options[:longitude]} IS NULL") "OR #{table_name}.#{geocoder_options[:longitude]} IS NULL")
} }
## ##
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment