Skip to content

Instantly share code, notes, and snippets.

@fortuity
fortuity / Rails 3 Routing Matching Subdomain and Path
Created September 12, 2010 20:37
Rails 3 Routing Matching Subdomain and Path
Stuffed::Application.routes.draw do
# This config.routes.rb file replaces the one offered in
# http://github.com/fortuity/rails3-subdomain-devise
# and allows a URL such as
# http://foo.lvh.me:3000/foo
# to be routed to
# http://foo.lvh.me:3000/
# while a URL such as
# http://foo.lvh.me:3000/bar
@fortuity
fortuity / How to use the GitHub master (unreleased) version of Rails 3
Created September 5, 2010 23:14
How to use the GitHub master (unreleased) version of Rails 3
# Add the following to your Gemfile to use the GitHub master (unreleased) version of Rails 3
gem 'rails', :git => 'git://github.com/rails/rails.git'
@fortuity
fortuity / gist:468417
Created July 8, 2010 18:46
Options for "rails generate scaffold"
$ rails generate scaffold BusinessEntry content:string --no-stylesheets --no-fixture --no-test-framework --no-helper --pretend
invoke mongoid
create app/models/business_entry.rb
route resources :business_entries
invoke scaffold_controller
create app/controllers/business_entries_controller.rb
invoke haml
create app/views/business_entries
create app/views/business_entries/index.html.haml
create app/views/business_entries/edit.html.haml
@fortuity
fortuity / gist:452364
Created June 25, 2010 03:41
Application generator template modifies a Rails app to use Mongoid, Devise, jQuery, Haml
# Application Generator Template
# Modifies a Rails app to use Mongoid, Devise, jQuery, Haml
# Usage: rails new app_name -m http://gist.github.com/raw/452364/gistfile1.txt
# More info: http://github.com/fortuity/rails3-mongoid-devise/
# If you are customizing this template, you can use any methods provided by Thor::Actions
# http://rdoc.info/rdoc/wycats/thor/blob/f939a3e8a854616784cac1dcff04ef4f3ee5f7ff/Thor/Actions.html
# and Rails::Generators::Actions
# http://github.com/rails/rails/blob/master/railties/lib/rails/generators/actions.rb
// ==========================================================================
// Project: Timehack - mainPage
// Copyright: ©2009 My Company, Inc.
// ==========================================================================
/*globals Timehack */
Timehack.mainPage = SC.Page.design({
mainPane: SC.MainPane.design({