diff options
Diffstat (limited to 'railties/guides/source')
-rw-r--r-- | railties/guides/source/active_support_core_extensions.textile | 25 | ||||
-rw-r--r-- | railties/guides/source/contributing_to_rails.textile | 2 |
2 files changed, 26 insertions, 1 deletions
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile index 696db30efb..dfc4d38112 100644 --- a/railties/guides/source/active_support_core_extensions.textile +++ b/railties/guides/source/active_support_core_extensions.textile @@ -1296,6 +1296,31 @@ Active Support defines 3rd person aliases of +String#start_with?+ and +String#en NOTE: Defined in +active_support/core_ext/string/starts_ends_with.rb+. +h4. +strip_heredoc+ + +The method +strip_heredoc+ strips indentation in heredocs. + +For example in + +<ruby> +if options[:usage] + puts <<-USAGE.strip_heredoc + This command does such and such. + + Supported options are: + -h This message + ... + USAGE +end +</ruby> + +the user would see the usage message aligned against the left margin. + +Technically, it looks for the least indented line in the whole string, and removes +that amount of leading whitespace. + +NOTE: Defined in +active_support/core_ext/string/strip.rb+. + h4. Access h5. +at(position)+ diff --git a/railties/guides/source/contributing_to_rails.textile b/railties/guides/source/contributing_to_rails.textile index a0225b4b17..7184759610 100644 --- a/railties/guides/source/contributing_to_rails.textile +++ b/railties/guides/source/contributing_to_rails.textile @@ -69,7 +69,7 @@ All of the Rails tests must pass with any code you submit, otherwise you have no NOTE: Ensure you install bundler v1.0 <shell> -gem install -v=1.0.0 bundler +gem install bundler bundle install --without db </shell> |