Closed infertux closed 9 years ago
Partial backtrace FYI:
NoMethodError - undefined method `[]' for nil:NilClass:
readthis (0.6.2) lib/readthis/cache.rb:149:in `fetch'
rabl (0.11.6) lib/rabl/cache_engine.rb:18:in `fetch'
rabl (0.11.6) lib/rabl/helpers.rb:143:in `fetch_result_from_cache'
rabl (0.11.6) lib/rabl/engine.rb:385:in `cache_results'
rabl (0.11.6) lib/rabl/engine.rb:47:in `render'
[...]
Thanks :smile:
Any chance to push a release with this fix to RubyGems @nesquena? Thanks.
@infertux yep, pushed 0.11.7 with your changes. Thanks! Please feel free to make any other improvements on rabl as you find you can and I am always happy to push new releases.
Thanks a lot @nesquena :)
It's a hash of options and it makes more sense to default with a hash as well.
Moreover, it fixes an issue I'm having where the
readthis
Gem expects a hash at https://github.com/sorentwo/readthis/blob/f2bf22550958ad0232d6537e3029127c8339a82f/lib/readthis/cache.rb#L148That said, I'm not sure whether this should be fixed in Rabl since ActiveSupport::Cache::Store uses
nil
as the default. Please let me know if you reckonreadthis
should handle thenil
case instead and I'll send a PR there.