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

Latest commit

 

History

History
34 lines (24 loc) · 858 Bytes

File metadata and controls

34 lines (24 loc) · 858 Bytes

Creates StaticPages Controller to serve static pages.

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")
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