On Jun 6, 4:37 am, chewmanfoo <[email protected]> wrote:
>
>   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?

Because you've used the block form of after_save, so self inside that
block is the class itself, not a particular instance

Fred

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to