ccocchi / rabl-rails

Rails 4.2+ templating system with JSON, XML and Plist support.
MIT License
209 stars 51 forks source link

use_custom_responder = true doesn't work on RoR 4.2 #77

Closed itkin closed 8 years ago

itkin commented 8 years ago

As I understood use_custom_responder make use of RablRails::Responder instead of ActionController::Responder

Doesn't seem to work (at least on RoR 4.2), you may want to add an active support hook into you railie.rb file ...

ActiveSupport.on_load :action_controller do
  self.responder = RablRails::Responder if RablRails.configuration.use_custom_responder
end

Edit : just realized responders have been extracted out from rails 4.2, the responders gem on its side has changed the prototype of the method api_behavior which doesn't take any parameter anymore

ccocchi commented 8 years ago

Fixed in 0.4.3. Custom responder will be removed from 0.5.0 version of the gem.