Skip to content

lodestone/sparks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sparks

Sparks is a rails plugin for handling static file content in your app.

To install:

script/plugin install git@github.com:lodestone/sparks.git

script/generate sparks

Add this line as the last route in config/routes.rb:
map.spark '*:sparkpath', :controller => 'static', :action => 'file'

How to use

This plugin allows you to drop in “static” files into your Rails app that will use the app layout and templating (erb, haml, etc).

Example:

/app/views/static/about-us.html.haml:


%h1 About Us .about We are great.


Now you get /about-us and /about-us.html.

You can also have nested paths like /about/us by creating sub-directories under app/views/static.

Really this is pretty dead-simple.

This is Copyright Matt Petty (matt@kizmeta.com)

License: MIT

Sparks is named after my friend Jay. :-)

About

magical static files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages