Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward options to before_validation in acts_as_mappable #10

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/geokit-rails3/acts_as_mappable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def acts_as_mappable(options = {})
self.auto_geocode_error_message = options[:auto_geocode][:error_message] || 'could not locate address'

# set the actual callback here
before_validation :auto_geocode_address, :on => :create
before_validation :auto_geocode_address, options.reject{|k,v|k == :auto_geocode}.reverse_merge!(:on => :create)
end
end
end
Expand Down