Permalink
Browse files

Merge pull request #13070 from kuldeepaggarwal/documentation-updation

[ci skip] used new syntax for scopes
  • Loading branch information...
senny committed Nov 27, 2013
2 parents 5fdbec7 + c29124c commit c65f8d224360721111a40d057b843ea068bffedc
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/core.rb
@@ -126,7 +126,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 c65f8d2

Please sign in to comment.