Skip to content

Instantly share code, notes, and snippets.

@macek
Created December 5, 2012 21:20
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 macek/4219617 to your computer and use it in GitHub Desktop.
Save macek/4219617 to your computer and use it in GitHub Desktop.
Things I learned from rails src

1. see a selection of routes

$ rake routes CONTROLLER=foo

2. remove heredoc indenting

require 'active_support/core_ext/string'

def hello
  string = <<-eos.strip_heredoc
    hello world
  eos
end

puts hello 

#=> 'hello world'
# hey, it properly removed the source code indenting!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment