Open wgreene opened 8 years ago
As the original author of most of the code in this gem, when it wasn't being maintained I forked it last year. I believe this bug was fixed in Flexirest 1.2.10. It's interface compatible with ActiveRestClient, you just need to change all instances of ActiveRestClient to Flexirest and update your Gemfile.
Let me know on https://github.com/andyjeffries/flexirest if it's not working and I'll fix it there...
Thank you so much! Flexirest is working perfectly. Had no trouble migrating over.
Glad to hear it. You're welcome.
Hello, I ran into an issue today where I was instantiating an object directly with a hash for which one of the values was a 4 digit integer. The following exception was raised:
no implicit conversion of Fixnum into String
I tracked the problem down to lines 29-30 in ActiveRestClient::Base.rb in the
initialize
method.Here's an example of the
attrs
hash passed tonew
that causes the exception:The exception is thrown as it interprets the
view_count
1001 as matching the DateTime regex.I would appreciate the help if I am missing something here. Similar values appear to instantiate without issue when done via
get
. I only see this problem when callingnew
directly.I patched this locally by rescuing the exception...e.g:
In our live environment I modified the solr result to format the
view_count
as a float (1001.0
) which bypasses the reggae match. Do you know of a better work around?Thanks so much. Again, this library has been a great help. If you would like any assistance with it, I'd be happy to fork it and implement any solution you might suggest.
-Will