1. 19 Jan, 2015 1 commit
    • Create Failing Test · ed7793d4
      Restoring polymorphic has_one relationships errored because paranoia was
      not correctly looking up the foreign_key.
      
      Output from failing test -
      
      ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column: parent_model_id: SELECT  "polymorphic_models".* FROM "polymorphic_models" WHERE ("polymorphic_models"."deleted_at" IS NOT NULL) AND (parent_model_id)  ORDER BY "polymorphic_models"."id" ASC LIMIT 1
      
      The test sets up a PolymorphicModel, which has_many parents. The
      ParentModel then has a has_one relationship with PolymorphicModel. When
      restoring, the foreign key is set as - `self.class.name.to_s.underscore_id`
      which will be parent_model_id, instead of the :as option.
      Patrick Koperwas committed
  2. 18 Jan, 2015 3 commits
  3. 28 Nov, 2014 2 commits
  4. 26 Nov, 2014 3 commits
  5. 13 Nov, 2014 1 commit
  6. 04 Sep, 2014 2 commits
  7. 22 Aug, 2014 2 commits
  8. 29 Jul, 2014 1 commit
  9. 28 Jul, 2014 2 commits
  10. 08 Jul, 2014 1 commit
  11. 25 Jun, 2014 1 commit
  12. 13 Jun, 2014 1 commit
  13. 19 Apr, 2014 1 commit
  14. 08 Apr, 2014 3 commits
  15. 13 Mar, 2014 1 commit
  16. 11 Mar, 2014 1 commit
  17. 30 Jan, 2014 1 commit
  18. 09 Jan, 2014 1 commit
  19. 03 Jan, 2014 2 commits
  20. 17 Dec, 2013 1 commit
  21. 10 Dec, 2013 1 commit
  22. 12 Nov, 2013 1 commit
  23. 05 Nov, 2013 1 commit
  24. 24 Oct, 2013 2 commits
  25. 20 Oct, 2013 1 commit
  26. 10 Oct, 2013 1 commit
  27. 09 Sep, 2013 1 commit
  28. 08 Jun, 2013 1 commit