Skip to content

Instantly share code, notes, and snippets.

@macek macek/rails_edu.md
Created Dec 5, 2012

Embed
What would you like to do?
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
You can’t perform that action at this time.