views:

43

answers:

0

I'm facing a problem I don't really understand.

This is my controller

  def index

    @resources = Resource.all(:limit => 10)

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @resources }
    end
  end

When i try to access the html page, everything works fine, but when i hit the .xml format, then i got this nasty problem from the log:

Parameters: {"name"=>["api", "resources.xml"]}

Resulting in a consequential 404 page. The page was created with a scaffold, and the routing rule

map.connect ':controller/:action/:id.:format'

exists, and also if i put it on the top, it doesn't work.

What can i do?