Sha256: 11e757f8d8677e985903d122b73a95412db864fa10c5cc10d93bbb02a35d7878
Contents?: true
Size: 1.44 KB
Versions: 2
Compression:
Stored size: 1.44 KB
Contents
Rambulance.setup do |config| # List of pairs of exception/corresponding http status. In Rails, the default # mappings are below: # <%= ActionDispatch::ExceptionWrapper.rescue_responses.map do |error_class, status| " # #{error_class.ljust(longest_error_name_size)} => :#{status}" end.join(",\n") %> # # If you add exceptions in this config, Rambulance uses the pairs you defined # here *in addition* to the default maddings. You can also override the default # mappings although you don't have to in most cases. # If Rambulance receives an exception that is not listed here, it'll render # the internal server error template and return 500 as http status. config.rescue_responses = { # "ActiveRecord::RecordNotUnique" => :unprocessable_entity, # "CanCan::AccessDenied" => :forbidden, # "Pundit::NotAuthorizedError" => :forbidden, # "YourCustomException" => :not_found } # The template name for the layout of the error pages. The default value is # 'application'. For exmaple, if this value is set to "error_page", Rambulance uses # 'app/views/layout/error_page.html.erb' as a layout for all the error pages. config.layout_name = "<%= layout_name %>" # The directry name to organize error page templates. The default value is # 'errors'. For exmaple, if this value is set to "error_pages", Rambulance # uses e.g. 'app/views/error_pages/not_found.html.erb'. config.view_path = "errors" end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rambulance-0.3.0 | lib/generators/rambulance/templates/rambulance.rb |
rambulance-0.2.0 | lib/generators/rambulance/templates/rambulance.rb |