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

Assign using #attr= instead of #write_attribute.

This fixes issue #256.
parent b572554a
No related branches found
No related tags found
No related merge requests found
......@@ -59,7 +59,7 @@ module Geocoder::Store
do_lookup(false) do |o,rs|
if r = rs.first
unless r.coordinates.nil?
o.send :write_attribute, self.class.geocoder_options[:coordinates], r.coordinates.reverse
o.__send__ "#{self.class.geocoder_options[:coordinates]}=", r.coordinates.reverse
end
r.coordinates
end
......@@ -74,7 +74,7 @@ module Geocoder::Store
do_lookup(true) do |o,rs|
if r = rs.first
unless r.address.nil?
o.send :write_attribute, self.class.geocoder_options[:fetched_address], r.address
o.__send__ "#{self.class.geocoder_options[:fetched_address]}=", r.address
end
r.address
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