I have written a simple jquery response in my rails 3 controller, I just want to test to see the result this returns (not automated testing).
My code looks like this:
class AppointmentsController < ApplicationController
def jsonlist
@appointments = Appointment.find(:all)
render :json => @appointments
end
Can I access this from a URL like: http://localhost:3000/appointments/jsonlist?
When I try, I get this error:
Couldn’t find Appointment with
ID=jsonlist
The error you’re getting does not appear to come from that action, it appears to be a conflict in your routes for whatever you have defined as your
showaction. Try defining your route forjsonlistbefore you define your route forshow.