I have Rails 3 application (running Rails RC1), and I have the following
controller:
class PluginsController < ApplicationController
respond_to :html, :xml, :json
def index
@plugins = Plugin.all
respond_with(@plugins)
end
end
If I try to render http://localhost:3000/plugins it works fine, showing
me the HTML version. If I try to get http://localhost:3000/plugins.json,
it also correctly sends me the JSON response.
However if I try http://localhost:3000/plugins.xml, I get the following
error:
Template is missing
Missing template plugins/index with {:locale=>[:en, :en],
:formats=>[:xml],
:handlers=>[:rjs, :haml, :erb, :rhtml, :builder, :rxml]} in view paths
"/Users/fcoury/Projects/backend/app/views",
"/Users/fcoury/Projects/backend/vendor/plugins/haml/app/views",
"/Users/fcoury/.rvm/gems/ree-1.8.7-2010.01@rails3/bundler/gems/
devise-6754ae7/app/views"
Also, my ApplicationController is pretty simple:
class ApplicationController < ActionController::Base
protect_from_forgery
layout ''application''
end
I have tried taking out the layout line from the control, but same
result.
Don''t know if it''s relevant, but I am using HAML and I only
have one
view file called plugins/index.haml.html.
Any ideas why this may be happening?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.