Permalink
Browse files

Merge pull request #13070 from kuldeepaggarwal/documentation-updation

[ci skip] used new syntax for scopes
  • Loading branch information...
1 parent bd4abae commit df0ece472ccce38af4598b6074d94ec7152f40ca @senny senny committed Nov 27, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/core.rb
@@ -129,7 +129,7 @@ def ===(object)
# Returns an instance of <tt>Arel::Table</tt> loaded with the current table name.
#
# class Post < ActiveRecord::Base
- # scope :published_and_commented, published.and(self.arel_table[:comments_count].gt(0))
+ # scope :published_and_commented, -> { published.and(self.arel_table[:comments_count].gt(0)) }
# end
def arel_table
@arel_table ||= Arel::Table.new(table_name, arel_engine)

0 comments on commit df0ece4

Please sign in to comment.