Skip to content
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.

vladalive/acts_as_static_controller

Repository files navigation

ActsAsStaticController

Creates StaticPages Controller to serve static pages.

Install

Install Ruby Gem:

gem install acts_as_static_controller

Add to /config/environment.rb

config.gem "acts_as_static_controller"

Or install as a plugin:

ruby script/plugin install git://github.com/vladalive/acts_as_static_controller.git

Configure routes:

/config/routes.rb:
map.static_pages # place after all routes

Create your static pages views at:

/views/static_pages/**/*

Use name convention:

view: /somepage.html.erb or /somepage/index.html.erb
route generated: /somepage or /somepage/
link: link_to static_page("somepage")

Examples

name.html.erb => /name
folder/two.html.erb => /folder/two
folder/two/index.html.erb => /folder/two

Copyright © 2009 Vlad Alive (vladalive.com), released under the MIT license

About

Rails Plugin: Creates StaticPages Controller to serve static pages.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published