Skip to content
Snippets Groups Projects
  1. Nov 12, 2010
    • Michael Halliday's avatar
      This fixes an odd error I was seeing in development mode when cache_classes =... · 79180de3
      Michael Halliday authored
      This fixes an odd error I was seeing in development mode when cache_classes = 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.
      79180de3
  2. Oct 08, 2010
  3. Oct 06, 2010
  4. Oct 05, 2010
  5. Oct 04, 2010
  6. Sep 23, 2010
  7. Sep 21, 2010
  8. Sep 20, 2010
  9. Sep 17, 2010
  10. Sep 10, 2010
  11. Sep 08, 2010
  12. Sep 04, 2010
  13. Sep 03, 2010
  14. Sep 02, 2010
  15. Sep 01, 2010
  16. Aug 31, 2010
Loading