Sha256: aa3db13de914a69a54d0501854719840cf53e40747d5af6d79802b3d97b1cc22

Contents?: true

Size: 470 Bytes

Versions: 47

Compression:

Stored size: 470 Bytes

Contents

class Exceptions < Merb::Controller

  attr_reader :handler 
  
  # handle NotFound exceptions (404)
  
   def not_found
     @handler = :not_found
     render :format => :html
   end
 
   # handle NotAcceptable exceptions (406)
   
   def not_acceptable
     @handler = :not_acceptable
     render "Handled by: not_acceptable"
   end
 
  # # Any client error (400 series)
  def client_error
    @handler = :client_error
    render "Handled by: client_error"
  end

end

Version data entries

47 entries across 35 versions & 2 rubygems

Version Path
merb-core-1.1.3 spec10/private/dispatch/fixture/app/controllers/exceptions.rb
merb-core-1.1.3 spec/private/dispatch/fixture/app/controllers/exceptions.rb
merb-core-1.1.3 spec10/public/webrat/test_app/gems/gems/merb-helpers-0.9.14/spec/fixture/app/controllers/exceptions.rb
merb-helpers-1.1.3 spec/fixture/app/controllers/exceptions.rb
merb-helpers-1.1.2 spec/fixture/app/controllers/exceptions.rb
merb-core-1.1.2 spec10/public/webrat/test_app/gems/gems/merb-helpers-0.9.14/spec/fixture/app/controllers/exceptions.rb
merb-core-1.1.2 spec10/private/dispatch/fixture/app/controllers/exceptions.rb
merb-core-1.1.2 spec/private/dispatch/fixture/app/controllers/exceptions.rb
merb-helpers-1.1.1 spec/fixture/app/controllers/exceptions.rb
merb-core-1.1.1 spec10/public/webrat/test_app/gems/gems/merb-helpers-0.9.14/spec/fixture/app/controllers/exceptions.rb
merb-core-1.1.1 spec10/private/dispatch/fixture/app/controllers/exceptions.rb
merb-core-1.1.1 spec/private/dispatch/fixture/app/controllers/exceptions.rb
merb-helpers-1.1.0 spec/fixture/app/controllers/exceptions.rb
merb-core-1.1.0 spec10/public/webrat/test_app/gems/gems/merb-helpers-0.9.14/spec/fixture/app/controllers/exceptions.rb
merb-core-1.1.0 spec/private/dispatch/fixture/app/controllers/exceptions.rb
merb-core-1.1.0 spec10/private/dispatch/fixture/app/controllers/exceptions.rb
merb-helpers-1.1.0.rc1 spec/fixture/app/controllers/exceptions.rb
merb-core-1.1.0.rc1 spec10/public/webrat/test_app/gems/gems/merb-helpers-0.9.14/spec/fixture/app/controllers/exceptions.rb
merb-core-1.1.0.rc1 spec/private/dispatch/fixture/app/controllers/exceptions.rb
merb-core-1.1.0.rc1 spec10/private/dispatch/fixture/app/controllers/exceptions.rb