Repository is archived
No commit activity in last 3 years
No release in over 3 years
Rails Plugin: Creates StaticPages Controller to serve static pages.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

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