Skip to content

Provides an area to store your static pages that still need to be rendered with the application layout.

License

Notifications You must be signed in to change notification settings

jqr/static_pages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static Pages

Provides an area to store your static pages that still need to be rendered with the application layout. You also get short routes to any template placed in the directory.

Ideal for pages like:

  • Homepage

  • Contact Us

  • Privacy Policy

  • Terms of Service

  • Error pages

Error pages will automatically be sought out in the static_pages directory with a fallback to the standard Rails behavior.

Install

script/plugin install git://github.com/jqr/static_pages.git

Usage

Once installed the plugin will create a folder app/views/static_pages/ for keeping of your static pages. Requests that aren’t handled by your other routes will fall back to looking for a template in static_pages.

home.html.erb            # site.com/home
contact_us.html.erb      # site.com/contact_us
500.html.erb             # site.com/500 and when your app gives a 500 error

You can easily test the error pages in development mode by adding this method to your ApplicationController.

def rescue_action(exception)
  rescue_action_in_public(exception)
end

Docs

rdoc.info/projects/jqr/static_pages

Homepage

github.com/jqr/static_pages

License

Copyright © 2008 Elijah Miller <elijah.miller@gmail.com>, released under the MIT license

About

Provides an area to store your static pages that still need to be rendered with the application layout.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages