nesquena / rabl

General ruby templating with json, bson, xml, plist and msgpack support
http://blog.codepath.com/2011/06/27/building-a-platform-api-on-rails/
MIT License
3.64k stars 334 forks source link

Fix Digestor errors on rails 5 #674

Closed jhawthorn closed 8 years ago

jhawthorn commented 8 years ago

On rails 5 with caching enabled, rabl encounters errors in the digestor

wrong number of arguments (3 for 0) occured

@databyte sums this up well in #653

In an interactive debug session, I basically get to Digestor.new and it throws wrong number of arguments (3 for 0) occured for Digestor.new(name, finder, options).digest. [...] The Rails 5 Digestor doesn't have an initializer and the 3rd parameter is actually the dependencies and not the options.

We're already calling Digestor.digest with the same signature as the built-in digest, so we should just use that.

databyte commented 8 years ago

I haven't looked at the Rails Digestor in detail to know what part it plays in the overall scheme of things. Why did we have to implement one for Rails 3 and 4?

I have a branch with a Rails 5 test suite on it, let me run your tweaks (aka bulk delete of code) against that.

jhawthorn commented 8 years ago

Closing this because an identical pull request, #679, was merged. (Why was this never reviewed or merged?)