Skip to content

Instantly share code, notes, and snippets.

@devpopol
Created April 13, 2012 03:36
Show Gist options
  • Save devpopol/2373452 to your computer and use it in GitHub Desktop.
Save devpopol/2373452 to your computer and use it in GitHub Desktop.
hello world app template
#generates a very basic app that runs a rails action; hello world!
remove_file("public/index.html")
route("root :to => 'welcome#index'")
create_file "app/controllers/welcome_controller.rb", <<-RUBY
class WelcomeController < ApplicationController
def index
render :text => %w[the quick brown fox jumps over the lazy dog near the riverbank].sample(2).join(" ") + ' ' + Time.now.to_s(:long)
end
end
RUBY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment