aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorBen Orenstein <ben.orenstein@gmail.com>2011-02-19 18:07:00 -0500
committerMani Tadayon <bowsersenior@gmail.com>2011-02-21 13:44:19 -0800
commit2394ad69a4b5055a282ea978eed506ebef68cef9 (patch)
treec89f37d17b2af903500f4322bb0eb53eb292e788 /railties
parent1e2ecc4d6f2bc528100d994a48118c560b87445c (diff)
downloadrails-2394ad69a4b5055a282ea978eed506ebef68cef9.tar.gz
rails-2394ad69a4b5055a282ea978eed506ebef68cef9.tar.bz2
rails-2394ad69a4b5055a282ea978eed506ebef68cef9.zip
Edit a few lines for readability.
Diffstat (limited to 'railties')
-rw-r--r--railties/guides/source/active_support_core_extensions.textile8
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile
index 535a048b3b..788c243d2a 100644
--- a/railties/guides/source/active_support_core_extensions.textile
+++ b/railties/guides/source/active_support_core_extensions.textile
@@ -20,7 +20,7 @@ Thus, after a simple require like:
require 'active_support'
</ruby>
-objects do not even respond to +blank?+, let's see how to load its definition.
+objects do not even respond to +blank?+. Let's see how to load its definition.
h5. Cherry-picking a Definition
@@ -42,7 +42,7 @@ h5. Loading Grouped Core Extensions
The next level is to simply load all extensions to +Object+. As a rule of thumb, extensions to +SomeClass+ are available in one shot by loading +active_support/core_ext/some_class+.
-Thus, if that would do, to have +blank?+ available we could just load all extensions to +Object+:
+Thus, to load all extensions to +Object+ (including +blank?+):
<ruby>
require 'active_support/core_ext/object'
@@ -432,7 +432,7 @@ h4. +require_library_or_gem+
The convenience method +require_library_or_gem+ tries to load its argument with a regular +require+ first. If it fails loads +rubygems+ and tries again.
-If the first attempt is a failure and +rubygems+ can't be loaded the method raises +LoadError+. On the other hand, if +rubygems+ is available but the argument is not loadable as a gem, the method gives up and +LoadError+ is also raised.
+If the first attempt is a failure and +rubygems+ can't be loaded the method raises +LoadError+. A +LoadError+ is also raised if +rubygems+ is available but the argument is not loadable as a gem.
For example, that's the way the MySQL adapter loads the MySQL library:
@@ -503,7 +503,7 @@ Model attributes have a reader, a writer, and a predicate. You can alias a model
<ruby>
class User < ActiveRecord::Base
# let me refer to the email column as "login",
- # much meaningful for authentication code
+ # possibly meaningful for authentication code
alias_attribute :login, :email
end
</ruby>