aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-11-27 00:15:26 -0800
committerYves Senn <yves.senn@gmail.com>2013-11-27 00:15:26 -0800
commitc65f8d224360721111a40d057b843ea068bffedc (patch)
treea037737ef211fe9fdf79325f58f797e06871c473
parent5fdbec7dd15a8e6edef861899accb8b3b69cc87a (diff)
parentc29124c4bdf8707c8759d9953f28cf00abfa76b2 (diff)
downloadrails-c65f8d224360721111a40d057b843ea068bffedc.tar.gz
rails-c65f8d224360721111a40d057b843ea068bffedc.tar.bz2
rails-c65f8d224360721111a40d057b843ea068bffedc.zip
Merge pull request #13070 from kuldeepaggarwal/documentation-updation
[ci skip] used new syntax for scopes
-rw-r--r--activerecord/lib/active_record/core.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb
index 96b5686ae0..8808ad5a4c 100644
--- a/activerecord/lib/active_record/core.rb
+++ b/activerecord/lib/active_record/core.rb
@@ -126,7 +126,7 @@ module ActiveRecord
# 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)