Skip to content

Instantly share code, notes, and snippets.

@lachlanjc
Forked from nbashaw/kickoff.rb
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lachlanjc/e47c48b9f6f1a4c66c2a to your computer and use it in GitHub Desktop.
Save lachlanjc/e47c48b9f6f1a4c66c2a to your computer and use it in GitHub Desktop.
# Kickoff. The quickest way to start new rails apps
# How it works:
# 1. Install the gem: `$ gem install kickoff-rails`
# 2. Generate your kickoff file `$ kickoff new myapp`
# 3. Edit the kickoff file to specify the foundation of your app
# 4. Generate your app: `$ kickoff`
# Set up your database
database = 'postgresql' # or 'sqlite3' or 'mysql'
# Set up extra gems
gems = ['stripe', 'medium-editor-rails', 'newrelic_rpm']
# Quickly add Bootstrap (imports styles and javascript). By default use_bootstrap is false.
use_bootstrap = true
# Add devise authentication, works the same way as Bootstrap, but includes more configuration.
use_devise = true
devise_modules = ['rememberable']
devise_fields = ['email', 'password']
# Define your models with ease
create_model do |m|
m.name :post
m.string :title
m.text :body
m.references :user
end
create_model do |m|
m.name :user
m.string :name
m.string :email
end
# Controllers & routes
create_controller do |c|
c.actions = [:new, :index, :show]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment