views:

18

answers:

1

Hi

I am a newbie trying to make a webservice that talks JSON. I have this in my controller:

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

I have nothing special in my routes, only the default:

ActionController::Routing::Routes.draw do |map|
  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'
end

Any ideas what is wrong here?

Thank you Søren

+1  A: 
 map.connect ':controller/:action.:format'
Bohdan Pohorilets