commit review: applies guidelines to "# =>"
This commit is contained in:
parent
cfad74cfef
commit
599c505837
@ -1155,8 +1155,8 @@ def with_exclusive_scope(method_scoping = {}, &block)
|
|||||||
# default_scope where(:published => true)
|
# default_scope where(:published => true)
|
||||||
# end
|
# end
|
||||||
#
|
#
|
||||||
# Article.new.published #=> true
|
# Article.new.published # => true
|
||||||
# Article.create.published #=> true
|
# Article.create.published # => true
|
||||||
def default_scope(options = {})
|
def default_scope(options = {})
|
||||||
self.default_scoping << construct_finder_arel(options, default_scoping.pop)
|
self.default_scoping << construct_finder_arel(options, default_scoping.pop)
|
||||||
end
|
end
|
||||||
|
@ -95,8 +95,8 @@ def scopes
|
|||||||
# scope :published, where(:published => true)
|
# scope :published, where(:published => true)
|
||||||
# end
|
# end
|
||||||
#
|
#
|
||||||
# Article.published.new.published #=> true
|
# Article.published.new.published # => true
|
||||||
# Article.published.create.published #=> true
|
# Article.published.create.published # => true
|
||||||
def scope(name, scope_options = {}, &block)
|
def scope(name, scope_options = {}, &block)
|
||||||
name = name.to_sym
|
name = name.to_sym
|
||||||
valid_scope_name?(name)
|
valid_scope_name?(name)
|
||||||
|
Loading…
Reference in New Issue
Block a user