aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/concern.rb
diff options
context:
space:
mode:
authorFrancesco Rodriguez <lrodriguezsanc@gmail.com>2012-09-17 00:22:18 -0500
committerFrancesco Rodriguez <lrodriguezsanc@gmail.com>2012-09-17 00:22:18 -0500
commitd71d5ba71fadf4219c466c0332f78f6e325bcc6c (patch)
tree24fc4e38ae693219946ad23df6adfe2294cd318f /activesupport/lib/active_support/concern.rb
parentc1c9f1c7b98eb219eda01f8ddaef7aa2ab710b9f (diff)
downloadrails-d71d5ba71fadf4219c466c0332f78f6e325bcc6c.tar.gz
rails-d71d5ba71fadf4219c466c0332f78f6e325bcc6c.tar.bz2
rails-d71d5ba71fadf4219c466c0332f78f6e325bcc6c.zip
update AS docs [ci skip]
Diffstat (limited to 'activesupport/lib/active_support/concern.rb')
-rw-r--r--activesupport/lib/active_support/concern.rb21
1 files changed, 12 insertions, 9 deletions
diff --git a/activesupport/lib/active_support/concern.rb b/activesupport/lib/active_support/concern.rb
index b927b58a9a..4ad49236f9 100644
--- a/activesupport/lib/active_support/concern.rb
+++ b/activesupport/lib/active_support/concern.rb
@@ -4,7 +4,7 @@ module ActiveSupport
# module M
# def self.included(base)
# base.extend ClassMethods
- # scope :disabled, where(:disabled => true)
+ # scope :disabled, where(disabled: true)
# end
#
# module ClassMethods
@@ -12,7 +12,8 @@ module ActiveSupport
# end
# end
#
- # By using <tt>ActiveSupport::Concern</tt> the above module could instead be written as:
+ # By using <tt>ActiveSupport::Concern</tt> the above module could instead be
+ # written as:
#
# require 'active_support/concern'
#
@@ -20,7 +21,7 @@ module ActiveSupport
# extend ActiveSupport::Concern
#
# included do
- # scope :disabled, where(:disabled => true)
+ # scope :disabled, where(disabled: true)
# end
#
# module ClassMethods
@@ -28,8 +29,9 @@ module ActiveSupport
# end
# end
#
- # Moreover, it gracefully handles module dependencies. Given a +Foo+ module and a +Bar+
- # module which depends on the former, we would typically write the following:
+ # Moreover, it gracefully handles module dependencies. Given a +Foo+ module
+ # and a +Bar+ module which depends on the former, we would typically write the
+ # following:
#
# module Foo
# def self.included(base)
@@ -52,8 +54,8 @@ module ActiveSupport
# include Bar # Bar is the module that Host really needs
# end
#
- # But why should +Host+ care about +Bar+'s dependencies, namely +Foo+? We could try to hide
- # these from +Host+ directly including +Foo+ in +Bar+:
+ # But why should +Host+ care about +Bar+'s dependencies, namely +Foo+? We
+ # could try to hide these from +Host+ directly including +Foo+ in +Bar+:
#
# module Bar
# include Foo
@@ -66,8 +68,9 @@ module ActiveSupport
# include Bar
# end
#
- # Unfortunately this won't work, since when +Foo+ is included, its <tt>base</tt> is the +Bar+ module,
- # not the +Host+ class. With <tt>ActiveSupport::Concern</tt>, module dependencies are properly resolved:
+ # Unfortunately this won't work, since when +Foo+ is included, its <tt>base</tt>
+ # is the +Bar+ module, not the +Host+ class. With <tt>ActiveSupport::Concern</tt>,
+ # module dependencies are properly resolved:
#
# require 'active_support/concern'
#