저는 JSON을 말하는 webservice를 만들기 위해 초보자입니다. 나는 내 컨트롤러에서이 있습니다 respond_to json 오류 : "/schedules/list.json"과 {: method => : get}이 일치하는 경로가 없습니다.
class SchedulesController < ApplicationController
def list
@schedules = Schedules.all
respond_to do |format|
format.html # list.html.erb
format.json { render :json => @schedules.to_json }
end
end
end
ActionController::Routing::Routes.draw do |map|
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'
end
모든 아이디어를 여기에 무엇이 잘못되었는지를?
는 소렌
대신 "목록"의 기본 "인덱스"동작을 사용할 수없는 이유가 거기에 감사합니다? – aNoble