Permalink
Browse files

[ci skip] used new syntax for scopes

  • Loading branch information...
kuldeepaggarwal committed Nov 27, 2013
1 parent 5fdbec7 commit c29124c4bdf8707c8759d9953f28cf00abfa76b2
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 c29124c

Please sign in to comment.