This repository has been archived by the owner. It is now read-only.
My curated set of technology choices.
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


A collection of helpers and libraries which I use in almost every project, and a generator to get started quickly.

Some of this stuff may graduate into gems or get contributed back to other projects.


  • Generators:
    • derail:app: Derails a new rails project, basically doing all the following:
      • Configure databases:
        • development: APPNAME_development/development/development
        • test: APPNAME_test/test/test
        • production: read from environment (DATABASE/DATABASE_USERNAME/DATABASE_PASSWORD).
      • Configure ActionMailer:
        • development: default_url_options to, MailCatcher delivery.
        • test: default_url_options to _APPNAME_.test.
      • Makes SASS the default stylesheet syntax (not SCSS) and converts application.css to application.css.sass.
      • Converts application.js to
      • Installs RSpec
      • Installs Cucumber
      • Installs RR
      • Installs Guard (ego, bundler, rspec, cucumber)
      • Runs formtastic:install
      • Runs derail:devise
      • Removes default index.html and rails.png
    • derail:devise: Install devise, setup a user, install remarkable_devise.
    • derail:devise:haml: Installs fully-localizable, HTML5, formtastic Devise HAML templates.
  • Updated scaffold templates:
    • HTML5, formtastic scaffold HAML templates.
    • Responder-based scaffold controller.
  • Helpers:
    • Activated link helper, adapted from a few places. Documentation coming.
    • Flashes helper, lists all your flashes in aside elements.
  • Vendored javascripts:
  • Plenty more to come!


To create a new app, I run:

rails new APPNAME --skip-test-unit --skip-bundle --database=postgresql --template

For handyness in zsh:

function derail() { rails new $1 --skip-test-unit --skip-bundle --database=postgresql --template $@[2,-1] }


derail APPNAME

You need to skip bundling due to a clash between rails and bundlers' vendored versions of the thor gem.

Vendored javascripts

Add them to your applictation's javascript files using sprockets require directives, a la jQuery:

//= require jquery_innershiv


  • It's Rails 3.1 only, but you should be basing your new projects on the latest and greatest! It'll be stable by the time you release... right?

  • I'm presuming your using my devise branch:

      gem "devise", :git => "git://", :branch => "template-inheritence"

    If not, copy the HAML templates into your project and re-twiddle the footer partial.


  • Home generator.
  • Admin generator.
  • Admin scaffold generator.
  • Pages generator.
  • (Some) in-app errors handler generator.
  • Page title helper inspired by page_title_helper
  • Vendored WYSIWYG (can't decide which library).
  • Formtastic WYSIWYG field helpers.
  • Tilt-based renderable activerecord fields with filter white/blacklists and stored filter type.
  • More tests.


Copyright (c) 2011 Samuel Cochran, released under the MIT license, see LICENSE.