Render XML response from Controller not working
Reported by Niko | October 28th, 2008 @ 09:38 AM
Working with the latest offical hobo release (0.8.3), this causes a problem:
class AdvertsController < ApplicationController
hobo_model_controller
auto_actions :all
def show
hobo_show do |format|
format.xml? do
@advert = Advert.find params[:id]
render :xml => @advert
end
format.html? do
# leave this to Hobo
end
end
end
end
But the result is:
NameError in AdvertsController#show
wrong constant name HTML?
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.2/lib/action_controller/
mime_responds.rb:146:in `const_get'
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.2/lib/action_controller/
mime_responds.rb:146:in `method_missing'
app/controllers/adverts_controller.rb:13:in `show'
/Library/Ruby/Gems/1.8/gems/hobo-0.8.3/lib/hobo/model_controller.rb:
407:in `response_block'
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.2/lib/action_controller/
mime_responds.rb:106:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.2/lib/action_controller/
mime_responds.rb:106:in `respond_to'
/Library/Ruby/Gems/1.8/gems/hobo-0.8.3/lib/hobo/model_controller.rb:
407:in `response_block'
/Library/Ruby/Gems/1.8/gems/hobo-0.8.3/lib/hobo/model_controller.rb:
467:in `hobo_show'
app/controllers/adverts_controller.rb:8:in `show'
Related thread from hobo user group:
http://groups.google.com/group/hobousers/browse_thread/thread/7e92a...
Comments and changes to this ticket
-
Tom Locke December 1st, 2008 @ 05:42 PM
- State changed from new to invalid
It's
format.html
, notformat.html?
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
People watching this ticket
- Nobody is watching this ticket.