Giter Site home page Giter Site logo

mattherick / nifty_errorpages Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 3.21 MB

a rails 3.2 engine for creating dynamic error pages

Home Page: http://www.frick-web.com/en/blog/nifty_errorpages-gem

License: MIT License

Ruby 70.40% JavaScript 4.77% CSS 24.83%

nifty_errorpages's Introduction

NiftyErrorpages

This gem contains a little Rails 3.2 engine for generating dynamic error pages. If an error occures, normally Rails will render a static 404.html, 422.html or 500.html file from the public folder. NiftyErrorpages allows you to handle all the rendering through an errors_controller with views. You can easily customize your views, layout, helper and controller.

The gem name is derived from the awesome NiftyGenerators Gem from Ryan Bates, because the default error pages have a quite similar style as the nifty generator views :-).

Quick Start

gem install nifty_errorpages

Or add it to your Gemfile:

gem "nifty_errorpages"

Generators

There are following generators available for customizing your error pages and the behaviour:

rails g nifty_errorpages:views          # generates view files
rails g nifty_errorpages:controllers    # generates controller files
rails g nifty_errorpages:helpers        # generates helper files

Or simple generate all files

rails g nifty_errorpages:all            # generates all files

Development

Feel free to fork this project and add additional features. If you recognize any bugs, please create a new pull request or simple let me know about your problem. You always can contact me under [email protected].

Testing

I run the tests under the production environment to simulate the exact error behavior under production. Because of this you need to migrate the production database first:

bundle exec rake db:migrate RAILS_ENV=production

After that you can simple run the specs, first cd into the spec folder and then run:

bundle exec rspec features/

Copyright (c) 2013, Matthias Frick, BSc. This project is released under the MIT LICENSE.

nifty_errorpages's People

Contributors

mattherick avatar

Stargazers

Jamie Clark avatar Jayson Lane avatar Tom avatar

Watchers

Tom avatar  avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.