-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
39 lines (24 loc) · 1021 Bytes
/
README
File metadata and controls
39 lines (24 loc) · 1021 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
HasPages
========
Simple Gem to allow Rails app to have "static" pages rendered in a layout.
Requirements
============
Rails 4
Installation
============
Gemfile:
gem 'has_pages', git: "https://github.com/beautifulcode/has_pages.git
Example Use
============
You have a set of semi static pages that should be served if no other routes are matched.
For example, given the following request /about/company, this will look in app/views/pages/about/company
The page will be rendered in the application layout by default, but will use an "about" layout if it exists.
This also provides page caching by default of these pages so Rails doesn't get involved on further requests to the same path.
Eventually, a macro of has_pages(options) can be called from your application controller to customize the behaviour of the plugin.
Some macro options could include:
* Caching On/Off
* Cache Directory
* Alternate Layout(s)
* Path Prefix
* Others?
Copyright (c) 2015 Aaron Glenn, released under the MIT license