apneadiving/Google-Maps-for-Rails — Issue #120: Why 'include InstanceMethods' in acts_as_gmappable?
Author: niuage
Created: 2011-11-23 00:18:09+00:00
State: open

Hey,

I just want to understand something, since I'm really not an expert in these kind of things.

Why do you `include InstanceMethods` in `acts_as_gmappable` in the `ActsAsGmappable` module?
I thought they were already included since `ActsAsGmappable` extend `extend ActiveSupport::Concern`. Is there a difference?

I was looking at this part of the code because I was wondering if it was possible to call acts_as_gmappable several times for one model.
For instance, I'd like to do:

module Geolocated
extend ActiveSupport::Concern

included do
acts_as_gmappable :check_process => true, :checker => "prevent_geocoding", :address => "location"
end
end

class User < ActiveRecord::Base
include Geolocated
acts_as_gmappable :validation => false
end

Thanks :)