1. 28 Nov, 2019 1 commit
  2. 02 Nov, 2017 1 commit
    • Fixes `really_destroy!` behavior with `sentinel_value` · 97623f17
      This removes the assumption from `really_destroy!` that there is
      only one column value, the deletion date, that needs to be updated
      on a model that is being `really_destroy!`ed. Instead, use the
      defined `paranoia_destroy_attributes` as they are used in `destroy`
      and other calls.
      
      This prevents an issue where the DBMS will complain when trying to
      `really_destroy!` one of these models, given that paranoia is
      attempting to insert a DateTime value into a boolean (or otherly-
      typed) column.
      
      Fixes #326
      Steve Rice committed
  3. 01 Nov, 2017 1 commit
  4. 09 Mar, 2017 1 commit
  5. 08 Mar, 2017 1 commit
  6. 07 Mar, 2017 2 commits
  7. 15 Feb, 2017 1 commit
  8. 14 Feb, 2017 1 commit
    • Fixes a problem of ambiguous table names when using only_deleted method and… · 20243035
      Fixes a problem of ambiguous table names when using only_deleted method and joining tables that have a scope on `with_deleted`
      
      Update homepage in gemspec
      
      The homepage is supposed to be where you can find the code. It is displayed on rubygems.org page. Currently it will redirect you back to the same page. Should point at this github repo.
      
      Update README to use proper version for Rails 5
      
      Version 2.2.0
      
      Ignore failures from all jruby's on travis
      
      Add explicit language about dependent: :destroy
      
      Update CHANGELOG.md
      
      update ruby and rails versions
      
      Use ActiveSupport.on_load to correctly re-open ActiveRecord::Base. https://github.com/rubysherpas/paranoia/issues/335
      
      Touch record on paranoia-destroy. Fixes #296
      
      Touch record on destroy by leveraging the paranoia_destroy_attributes.
      Applied the same to the restore-method as this eliminates the extra query.
      Thomas Romera committed
  9. 28 Jan, 2017 1 commit
  10. 15 May, 2016 1 commit
  11. 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
  12. 02 Feb, 2016 3 commits
  13. 01 Feb, 2016 2 commits
  14. 28 Oct, 2015 1 commit
  15. 26 Sep, 2015 1 commit
  16. 26 Aug, 2015 1 commit
  17. 03 Aug, 2015 1 commit
  18. 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
  19. 01 Jul, 2015 1 commit
  20. 21 Jun, 2015 1 commit
  21. 18 Jun, 2015 1 commit
  22. 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
  23. 07 Apr, 2015 1 commit
  24. 18 Feb, 2015 1 commit
  25. 17 Feb, 2015 5 commits
  26. 22 Jan, 2015 7 commits