Here''s my error:
NameError (undefined local variable or method `gmap_full_address'' for
#<Class:0x7f9bae66e788>):
app/models/address.rb:12
here''s the model:
class Address < ActiveRecord::Base
attr_accessible :name, :address1, :address2, :city, :state_id, :country_id,
:postal_code,
:carrier_id, :time_zone, :gmap_lat, :gmap_long
...
after_save {
logger.info "attempting geocode retrieval for
#{gmap_full_address}" <------------------
result = get_geocode(gmap_full_address)
gmap_lat = result[:latitude]
gmap_long = result[:longitude]
save
}
def gmap_full_address
address1 + ", " + city + ", " + state.abbrev
end
I don''t understand why it''s saying gmap_full_address is
indefined.
Anyone know why?
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.