Created
April 13, 2012 03:36
-
-
Save devpopol/2373452 to your computer and use it in GitHub Desktop.
hello world app template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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