Module: Geokit::Cache::ActiveRecord
- Defined in:
- lib/geokit/cache/active_record.rb
Instance Method Summary collapse
Instance Method Details
#acts_as_geokit_cache ⇒ Object
7 8 9 10 11 |
# File 'lib/geokit/cache/active_record.rb', line 7 def acts_as_geokit_cache include Geokit::Cache::Model extend Geokit::Cache::Model::ClassMethods is_geocodable :require => true end |
#is_geocodable(options = {}) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/geokit/cache/active_record.rb', line 13 def is_geocodable( = {}) super if [:cache] define_method(:geocoder) do [:cache].to_s.singularize.camelize.constantize end end end |