Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix code example in ActiveRecord::Relation#none

  • Loading branch information...
commit 9dccf008e1545415143dccc3d7406c6f34b6628f 1 parent d2c6400
@carlosantoniodasilva carlosantoniodasilva authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 activerecord/lib/active_record/relation/query_methods.rb
View
6 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
Please sign in to comment.
Something went wrong with that request. Please try again.