1. 08 Feb, 2016 1 commit
    • Add scope without_deleted · aa73c8f3
      Add a without_deleted scope to manually exclude paranoia-deleted records, which is essentially the paranoia_scope.
      Useful when using the option :without_default_scope or the unscoping of a paranoia-model was required.
      Aliased it to the paranoia_scope as opposed to the existing with_deleted scope.
      rbr committed
  2. 02 Feb, 2016 3 commits
  3. 01 Feb, 2016 2 commits
  4. 28 Oct, 2015 1 commit
  5. 26 Sep, 2015 1 commit
  6. 26 Aug, 2015 1 commit
  7. 03 Aug, 2015 1 commit
  8. 12 Jul, 2015 1 commit
    • Add paranoia_destroy_attributes and paranoia_restore_attributes as extension points · b2b8d19e
      Use update_columns rather than touch to update the record, for
      generality
      
      Unlike touch, update_columns does not create a transaction for
      itself, so we need to add the record to the transaction, if present.
      If there is not a current_transaction, the add is a no-op.
      
      This all means that delete will not invoke a transaction or run the
      after_commit callbacks unless called from within one, which is
      consistent with the Rails docs and the behavior of
      ActiveRecord::Base#delete.
      Ben Woosley committed
  9. 01 Jul, 2015 1 commit
  10. 21 Jun, 2015 1 commit
  11. 18 Jun, 2015 1 commit
  12. 16 Jun, 2015 1 commit
    • Fix association class name for namespaced has one model lookups · 72287624
      Use association.klass.name instead of association.class_name to get the
      namespaced class name and therefore prevent:
      
      `Object.get_const(association_class_name)`
      
      from raising "uninitialized constant ParanoidHasOne"
      in the following situation:
      
      module Something
        def self.table_name_prefix
          "something_"
        end
      
        class ParanoidHasOne < ActiveRecord::Base
          acts_as_paranoid
          has_one :paranoid_belongs_to, dependent: :destroy
        end
      
        class ParanoidBelongsTo < ActiveRecord::Base
          acts_as_paranoid
          belongs_to :paranoid_has_one
        end
      end
      
      hasOne = Namespaced::ParanoidHasOne.create
      hasOne.destroy
      hasOne.restore(:recursive => true) # previously would explode
      Landon Wilkins committed
  13. 07 Apr, 2015 1 commit
  14. 18 Feb, 2015 1 commit
  15. 17 Feb, 2015 5 commits
  16. 22 Jan, 2015 9 commits
  17. 19 Jan, 2015 3 commits
  18. 18 Jan, 2015 3 commits
  19. 28 Nov, 2014 2 commits
  20. 26 Nov, 2014 1 commit