roar-rails
roar-rails copied to clipboard
errors when "Rendering from render"
the issue appears with the includes in the controller
class Api::V2::AppointmentsController
in my rspecs, I consistently get:
Failure/Error: get "/api/v2/appointments/123" ActionController::RoutingError: undefined method `responder=' for Api::V2::AppointmentsController:Class # ./app/controllers/api/v2/appointments_controller.rb:2:in`include'
AND
Failure/Error: get "/api/v2/appointments/#{@appointment.id}" AbstractController::ActionNotFound: The action 'show' could not be found for Api::V2::AppointmentsController
When remove those includes and use the alternative:
render json: AppointmentRepresenter.new(@appointment).to_json, status: :ok'
this works out as expected
Am I doing something wrong?
Ruby 2.1.2 Rails 4.1.5 Rspec 3.1.0
thanks
I remember this problem from a while ago (undefined method responder='
) but thought we had it fixed. Can you find out where in Rails 4.1 the #responder=
method is defined?
Does that help? https://github.com/apotonick/roar-rails/issues/87