Skip to content
Browse files

Fix incorrect example in mongoid tips for accessing a user in ActiveR…

…ecord
  • Loading branch information...
1 parent 385642c commit b16b090b21551cbe61ba173b1f1b9cde1b304a5c @matsimitsu matsimitsu committed Oct 31, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 source/en/mongoid/docs/tips.haml
View
2 source/en/mongoid/docs/tips.haml
@@ -235,7 +235,7 @@
field :user_id, type: Integer
def user
- @user ||= Band.where(id: user_id).first
+ @user ||= User.find(user_id)
end
def user=(user)

0 comments on commit b16b090

Please sign in to comment.
Something went wrong with that request. Please try again.