Please sign in to comment.
This fixes an odd error I was seeing in development mode when cache_c…
…lasses = false (the default), specifically when loading an object throught the parent in load_and_authorize_resource. Assume Photo model and User model where user has many photos: @photo = current_user.photos.find(1) # this returns a photo @photo1 = Photo.find(1) @photo.kind_of?(Photo) is not always true for some reason when class_cacheing is false. Where as @photo1.kind_of?(Photo) always appears to be true. Of interesting note, in the above example @photo != @photo1 if kind_of? is false. Very odd. Again, this only appears to be when loading and object through an association.
- Loading branch information...