提交 8242345c 编写于 作者: C Carlos Antonio da Silva

Fix named scope + class method example

Closes #8804 [ci skip]
上级 efbb041f
......@@ -134,16 +134,14 @@ def scope_attributes? # :nodoc:
# end
#
# def self.titles
# map(&:title)
# pluck(:title)
# end
#
# end
#
# We are able to call the methods like this:
#
# Article.published.featured.latest_article
# Article.featured.titles
def scope(name, body, &block)
extension = Module.new(&block) if block
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册