Permalink
Browse files

Fix code example in ActiveRecord::Relation#none

  • Loading branch information...
1 parent d2c6400 commit 9dccf008e1545415143dccc3d7406c6f34b6628f @carlosantoniodasilva carlosantoniodasilva committed Feb 1, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 activerecord/lib/active_record/relation/query_methods.rb
@@ -216,11 +216,11 @@ def lock(locks = true)
#
# 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

0 comments on commit 9dccf00

Please sign in to comment.