Skip to content

Commit

Permalink
All scopes are now cross-referenced.
Browse files Browse the repository at this point in the history
  • Loading branch information
rizwanreza committed Jun 20, 2010
1 parent 46dd8af commit 3ef1d63
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions activerecord/lib/active_record/named_scope.rb
Expand Up @@ -4,7 +4,7 @@
require 'active_support/core_ext/object/blank'

module ActiveRecord
# = Active Record Named Scopes
# = Active Record Named \Scopes
module NamedScope
extend ActiveSupport::Concern

Expand All @@ -20,10 +20,10 @@ module ClassMethods
# fruits = fruits.limit(10) if limited?
#
# Anonymous \scopes tend to be useful when procedurally generating complex
# queries, where passing intermediate values (scopes) around as first-class
# queries, where passing intermediate values (\scopes) around as first-class
# objects is convenient.
#
# You can define a scope that applies to all finders using
# You can define a \scope that applies to all finders using
# ActiveRecord::Base.default_scope.
def scoped(options = {}, &block)
if options.present?
Expand All @@ -38,7 +38,7 @@ def scopes
read_inheritable_attribute(:scopes) || write_inheritable_attribute(:scopes, {})
end

# Adds a class method for retrieving and querying objects. A scope represents a narrowing of a database query,
# Adds a class method for retrieving and querying objects. A \scope represents a narrowing of a database query,
# such as <tt>where(:color => :red).select('shirts.*').includes(:washing_instructions)</tt>.
#
# class Shirt < ActiveRecord::Base
Expand Down

0 comments on commit 3ef1d63

Please sign in to comment.