标签: ruby-on-rails activerecord scope
在解释scope的文档中,在下面的示例中两次调用范围的内容是什么?第一组与Article.new('published': true)类似,但第二组published做了什么?
Article.new('published': true)
published
class Article < ActiveRecord::Base scope :published, -> { where(published: true) } end Article.published.new.published # => true