Provides an area to store your static pages that still need to be rendered with the application layout.
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app/controllers
config
lib
.gitignore
LICENSE
README.rdoc
init.rb
install.rb
uninstall.rb

README.rdoc

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