Closed niuage closed 12 years ago
I see but didn't test myself, do you have some suggestion to fix this?
Maybe:
self.send("#{gmaps4rails_options[:checker]}=", true)
It's not exactly the same thing but it should work. Maybe I'll try it, but for now, I left my rails 3.2 branch and went back to 3.1. It will be something to think about when you upgrade to rails 3.2.
I'm not using attr_accessor
but I'm seeing a similar exception in Rails 3.2.1:
NoMethodError (undefined method `gmaps' for #<User:0x007fd06c47c8b0>)
activemodel (3.2.1) lib/active_model/attribute_methods.rb:407:in `method_missing'
activerecord (3.2.1) lib/active_record/attribute_methods.rb:126:in `method_missing'
gmaps4rails (1.4.3) lib/gmaps4rails/acts_as_gmappable.rb:15:in `process_geocoding'
...
I guess that in your case, the part failing is:
self.send(gmaps4rails_options[:checker]) == true
But honestly, I can't see why if you have a gmaps
column in your User model...
I'll install Rails 3.2 to have a look.
@niuage : thanks for report, bug fixed and 1.4.4 released. @ryanb : sorry, I don't know how to reproduce the bug, could you please tell me a bit more?
Cool, thanks!
It may have been related to the same problem, I'll give it a try and see if it's fixed now.
I might be mistaken, but I don't think the following will work in rails 3.2.0 when using an attr_accessor for :checker. (attr_accessor :gmaps for instance):
https://github.com/rails/rails/issues/4583