sorentwo / readthis

:newspaper: Pooled active support compliant caching with redis
MIT License
504 stars 40 forks source link

Handle case when nil is explicitly passed to fetch #25

Closed dasnixon closed 8 years ago

dasnixon commented 8 years ago

I ran in to this issue while using the active model serializers gem version v0.10.0.rc3.

They default their options that get passed to the cache as nil if none are set. Using an options hash doesn't guard against explicitly passed parameters, in this case nil. That caused an error, shown in the screenshot below.

I hope this helps :)

screen shot 2015-10-15 at 11 56 14 pm

sorentwo commented 8 years ago

Thanks for the fix. That pesky nil messing everything up again!

I left a couple of minor notes, but can you also add a changelog entry?

dasnixon commented 8 years ago

@sorentwo updated, let me know if there is anything else. Appreciate the fast response and the awesome gem! :+1:

sorentwo commented 8 years ago

Thanks for the patch @dasnixon! Glad you're getting use out of the gem =)