Google-Maps-for-Rails icon indicating copy to clipboard operation
Google-Maps-for-Rails copied to clipboard

After updating from 1.5.7 to 1.5.8: undefined local variable or method acts_as_gmappable

Open donni106 opened this issue 6 years ago • 1 comments

We have an initializer where we class_eval a model, that implements Gmaps4Rails.

Rails.application.config.to_prepare do
  Goldencobra::Location.class_eval do
    acts_as_gmappable
    ...
  end
end

With version 1.5.6 and 1.5.7 everything worked fine. After updating to 1.5.8 the error is thrown.

.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activerecord-3.2.22.5/lib/active_record/dynamic_matchers.rb:55:in method_missing': undefined local variable or method acts_as_gmappable' for #Class:0x007f84db10b6b8 (NameError)

In the changes I cannot see anything related. How come and what can we do? Thx

donni106 avatar Nov 02 '18 11:11 donni106

It is deprecated in v2. https://github.com/apneadiving/Google-Maps-for-Rails/wiki/Why-but-why%3F

one-more-alex avatar Nov 27 '19 11:11 one-more-alex