On Sep 11, 2:26 pm, Tom Locke <
t...@tomlocke.com> wrote:
> def show
> hobo_showdo |format|
Hi Tom,
I tried to render XML from the sample advert controller with the
latest and greatest hobo, but it seems to not working that way:
=========================================
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'
=========================================
Since I am hobo newbie, any help is very appreciated.
Thanks,
Niko