Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
magical static files
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app/controllers
config
generators/sparks
templates
README
README.textile

README.textile

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. :-)

Something went wrong with that request. Please try again.