mhgbrown / cached_resource

Caching for ActiveResource
MIT License
80 stars 28 forks source link

NoMethodError if no record is found #45

Closed csuma closed 4 years ago

csuma commented 5 years ago

Hello. ActiveRessource 5.1.0 has a breaking change. In 5.0.0 the find method with all, first and last scope returns an empty array if no resource is found. In 5.1.0 it returns nil, which leads to a NoMethodError in caching.rb, line 141. nil has no persited? method.

Daniel-ltw commented 5 years ago

Feel free to open a pull request.

Will be keen to look at it.