aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-02-01 15:35:07 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-02-01 15:35:14 -0200
commit9dccf008e1545415143dccc3d7406c6f34b6628f (patch)
treef4f63b0ca7bafc6df1304103108bef1d05fd25e9 /activerecord
parentd2c64009482d38d4894dd09d2d1e2fb4a165ecac (diff)
downloadrails-9dccf008e1545415143dccc3d7406c6f34b6628f.tar.gz
rails-9dccf008e1545415143dccc3d7406c6f34b6628f.tar.bz2
rails-9dccf008e1545415143dccc3d7406c6f34b6628f.zip
Fix code example in ActiveRecord::Relation#none
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb
index 6a28d7b155..6f464d6ad0 100644
--- a/activerecord/lib/active_record/relation/query_methods.rb
+++ b/activerecord/lib/active_record/relation/query_methods.rb
@@ -216,11 +216,11 @@ module ActiveRecord
#
# def visible_posts
# case role
- # if 'Country Manager'
+ # when 'Country Manager'
# Post.where(:country => country)
- # if 'Reviewer'
+ # when 'Reviewer'
# Post.published
- # if 'Bad User'
+ # when 'Bad User'
# Post.none # => returning [] instead breaks the previous code
# end
# end