Hi,
I have the following setup:
class Fred < Application
class InvalidKey < Merb::ControllerExceptions::Unauthorized; end
def blee
raise InvalidKey unless key
end
end
I have added a view exception template in
views/exceptions/invalid_key.html.erb
but I am not seeing the exception page being rendered ?? The request
seems to correctly
go to the right exception controller action but the exception page is
not being rendered ??
NOTE: Changing to
raise NotFound unless key
produces the same result...
What am I missing ?
Thanks,
Fernand
Stack:
Unable to connect. Invalid credentials - (InvalidKey)
/Users/fgaliana/work/new_ci/projects/domain/applications/fred/trunk/app/controllers/fred.rb:19:in
''blee''
/opt/local/lib/ruby/gems/1.8/gems/merb-0.5.0/lib/merb/abstract_controller.rb:87:in
`send''
/opt/local/lib/ruby/gems/1.8/gems/merb-0.5.0/lib/merb/abstract_controller.rb:87:in
`call_action''
/opt/local/lib/ruby/gems/1.8/gems/merb-0.5.0/lib/merb/abstract_controller.rb:43:in
`dispatch''
/opt/local/lib/ruby/gems/1.8/gems/merb-0.5.0/lib/merb/controller.rb:112:in
`dispatch''
/opt/local/lib/ruby/gems/1.8/gems/merb-0.5.0/lib/merb/dispatcher.rb:51:in
`dispatch_action''
/opt/local/lib/ruby/gems/1.8/gems/merb-0.5.0/lib/merb/dispatcher.rb:51:in
`synchronize''
/opt/local/lib/ruby/gems/1.8/gems/merb-0.5.0/lib/merb/dispatcher.rb:51:in
`dispatch_action''
/opt/local/lib/ruby/gems/1.8/gems/merb-0.5.0/lib/merb/dispatcher.rb:35:in
`handle''
/opt/local/lib/ruby/gems/1.8/gems/merb-0.5.0/lib/merb/mongrel_handler.rb:87:in
`process''
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/lib/mongrel.rb:159:in
`process_client''
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/lib/mongrel.rb:158:in
`each''
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/lib/mongrel.rb:158:in
`process_client''
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/lib/mongrel.rb:285:in
`run''
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/lib/mongrel.rb:285:in
`initialize''
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/lib/mongrel.rb:285:in
`new''
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/lib/mongrel.rb:285:in
`run''
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/lib/mongrel.rb:268:in
`initialize''
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/lib/mongrel.rb:268:in
`new''
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/lib/mongrel.rb:268:in
`run''
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/lib/mongrel/configurator.rb:282:in
`run''
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/lib/mongrel/configurator.rb:281:in
`each''
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/lib/mongrel/configurator.rb:281:in
`run''
/opt/local/lib/ruby/gems/1.8/gems/merb-0.5.0/lib/merb/server.rb:628:in
`cloaker_''
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/lib/mongrel/configurator.rb:50:in
`call''
/opt/local/lib/ruby/gems/1.8/gems/mongrel-1.1.2/lib/mongrel/configurator.rb:50:in
`initialize''
/opt/local/lib/ruby/gems/1.8/gems/merb-0.5.0/lib/merb/server.rb:619:in
`new''
/opt/local/lib/ruby/gems/1.8/gems/merb-0.5.0/lib/merb/server.rb:619:in
`mongrel_start''
/opt/local/lib/ruby/gems/1.8/gems/merb-0.5.0/lib/merb/server.rb:548:in
`run''
/opt/local/lib/ruby/gems/1.8/gems/merb-0.5.0/bin/merb:6
/opt/local/bin/merb:16:in `load''
/opt/local/bin/merb:16
Setting up session
Finalize session
Time spent in Exceptions#invalid_key action: 0.006838 seconds
Routing to controller: Exceptions action: invalid_key
Route Recognition & Parsing HTTP Input took: seconds
Request Times: {:controller=>"Exceptions",
:action_time=>0.006838,
:total_request_time=>0.016953, :action=>"invalid_key"}
Response status: 401
Complete Request took: 0.016953 seconds, 58.986610039521 Requests/Second
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/merb-devel/attachments/20071218/bbab1623/attachment-0001.html