You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the issue appears with the includes in the controller
class Api::V2::AppointmentsController < ApplicationController
include ::Roar::Rails::ControllerAdditions
include ::Roar::Rails::ControllerAdditions::Render
# GET /api/v2/appointments/:id
def show
@appointment = Appointment.first
if @appointment
# render json: AppointmentRepresenter.new(@appointment).to_json, status: :ok
render @appointment, status: :ok
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:
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?
the issue appears with the includes in the controller
in my rspecs, I consistently get:
AND
When remove those includes and use the alternative:
this works out as expected
Am I doing something wrong?
Ruby 2.1.2
Rails 4.1.5
Rspec 3.1.0
thanks
The text was updated successfully, but these errors were encountered: