Socket
Book a DemoInstallSign in
Socket

cuba-errors

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cuba-errors

0.0.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

Cuba::NotFound

Not found helper for Cuba.

Installation

Add this line to your application's Gemfile:

gem 'cuba-errors'

And then execute:

$ bundle

Or install it yourself as:

$ gem install cuba-errors

Usage

See an example:

require 'cuba'
require 'cuba/errors'
require 'cuba/render'

Cuba.plugin Cuba::Errors
Cuba.plugin Cuba::Render

# This setting specifies which view is going to be used for rendering a 404
# page. If not set, nothing will be rendered.
Cuba.settings[:errors][:not_found] = 'not_found'

Cuba.define do
  on default do
    # sets status = 404
    # sets Content-Type = text/html; charset=utf-8
    # renders views/not_found.erb
    not_found!
  end
end

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create a new Pull Request

License

See the LICENSE.

FAQs

Package last updated on 10 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.