We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Geocoder should handle instances of IPAddr (used for database columns with type inet) - like mentioned in #1513.
IPAddr
inet
After upgrading to 1.8.4 this does not work anymore. This regression was caused by fixing #1662 with 95eeaba.
The sanitized_text method tries to call IPAddr#strip, which does not exist: https://github.com/alexreisner/geocoder/blob/v1.8.4/lib/geocoder/query.rb#L26
sanitized_text
IPAddr#strip
myapp(dev)> Geocoder::Query.new(IPAddr.new "1.1.1.1").sanitized_text (myapp):8:in `<main>': undefined method `strip' for an instance of IPAddr (NoMethodError) text.strip ^^^^^^
This patch allows using 1.8.4 in my app:
1.8.4
IPAddr.class_eval do delegate :strip, to: :to_s end
The text was updated successfully, but these errors were encountered:
Thanks for this exemplary bug report. Seems like we should change that line to text.to_s.strip and add a test to make sure this doesn't happen again.
text.to_s.strip
Sorry, something went wrong.
Fixed NoMethod error when an IPAddr instance is an argument of Geocod…
c4264dd
…er::Query.new fixes alexreisner#1673
Successfully merging a pull request may close this issue.
Expected behavior
Geocoder should handle instances of
IPAddr
(used for database columns with typeinet
) - like mentioned in #1513.After upgrading to 1.8.4 this does not work anymore.
This regression was caused by fixing #1662 with 95eeaba.
Actual behavior
The
sanitized_text
method tries to callIPAddr#strip
, which does not exist:https://github.com/alexreisner/geocoder/blob/v1.8.4/lib/geocoder/query.rb#L26
Steps to reproduce
This patch allows using
1.8.4
in my app:Environment info
The text was updated successfully, but these errors were encountered: