- 28 Oct, 2015 1 commit
-
-
Leonardo Alifraco committed
-
- 26 Sep, 2015 1 commit
-
-
Leonardo Alifraco committed
-
- 26 Aug, 2015 1 commit
-
-
* Rely on bundler/setup to setup the load paths
Mauro George committed
-
- 03 Aug, 2015 1 commit
-
-
Amit Aharoni committed
-
- 12 Jul, 2015 1 commit
-
-
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
-
- 01 Jul, 2015 1 commit
-
-
Marcus Ilgner committed
-
- 21 Jun, 2015 1 commit
-
-
Sammy Larbi committed
-
- 18 Jun, 2015 1 commit
-
-
Sammy Larbi committed
-
- 16 Jun, 2015 1 commit
-
-
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
-
- 07 Apr, 2015 1 commit
-
-
Nikolay Norkin committed
-
- 18 Feb, 2015 1 commit
-
-
I asked about `restore` in the [Notes](https://github.com/radar/paranoia/pull/192#issue-51914917) of the PR's description. Personally I don't need such a behaviour. So removing.
Sergey Alekseev committed
-
- 17 Feb, 2015 5 commits
-
-
Sergey Alekseev committed
-
This will allow to detect counter cached columns changes in callbacks like `after_destroy` or `after_commit on: :destroy`.
Sergey Alekseev committed -
My goal is Rails 4.2 support and it works well with Rails 4.2. I’m leaving this bug not fixed for Rails 4.1 for the time being.
Sergey Alekseev committed -
Sergey Alekseev committed
-
Sergey Alekseev committed
-
- 22 Jan, 2015 9 commits
-
-
This is a test for a case when a model has a has_one association with an after_validation callback, and we have failed validation. Paranoia will attempt to touch the deleted_at column on the child record that has been built but not saved. Fixes #180
Nick Anderson committed -
This allows testing rails 4.0 on ruby 2.2
John Hawthorn committed -
John Hawthorn committed
-
John Hawthorn committed
-
John Hawthorn committed
-
We no longer have different behaviour between AR versions.
John Hawthorn committed -
John Hawthorn committed
-
Thanks @kidlab
John Hawthorn committed -
There was a change in ActiveRecord#update_columns on latest rails so now it checks for `destroyed?` instead of `persisted?`. Paranoia can't override `destoyed?` like this anymore otherwise `update_columns` will always raise: ActiveRecord::ActiveRecordError: cannot update a destroyed record see https://github.com/rails/rails/commit/0f99aa615e11c50cc64b567f54cf64f59108c5e5
Washington Luiz committed
-
- 19 Jan, 2015 3 commits
-
-
Shreyas Agarwal committed
-
To ensure that we are using the association _type in our scope.
John Hawthorn committed -
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
-
- 18 Jan, 2015 3 commits
-
-
DEPRECATION WARNING: Currently, Active Record suppresses errors raised within `after_rollback`/`after_commit` callbacks and only print them to the logs. In the next version, these errors will no longer be suppressed. Instead, the errors will propagate normally just like in other Active Record callbacks. apply the deprecation fix for ActiveRecord >= 4.2 only
Sergey Alekseev committed -
DEPRECATION WARNING: You are passing an instance of ActiveRecord::Base to `find`. Please pass the id of the object by calling `.id`. (called from block in restore at /Users/sergey/ruby_projects/paranoia/lib/paranoia.rb:38)
Sergey Alekseev committed -
John Hawthorn committed
-
- 28 Nov, 2014 2 commits
-
-
Change-Id: Ib73e43a5adcb8bd9b5bbf5b7ca60f9865e5415e7
John Hawthorn committed -
Martin Sereinig committed
-
- 26 Nov, 2014 3 commits
-
-
Regression from 6881e750 We need to be able to load our class definitions without having an available database connection.
John Hawthorn committed -
Change connect! to setup!, so that we can use connect! to give us an empty DB with no tables. Use ensure where appropriate to ensure that tests after that one can run even if it fails.
John Hawthorn committed -
This reverts commit 6881e750.
John Hawthorn committed
-
- 13 Nov, 2014 1 commit
-
-
see https://github.com/radar/paranoia/issues/169
Braden Anderson committed
-
- 04 Sep, 2014 2 commits
-
-
Alexey Pokhozhaev committed
-
Alexey Pokhozhaev committed
-
- 22 Aug, 2014 1 commit
-
-
Use fetch for sentinel_value Use DateTime for sentinel_value example Use an epoch. rails convers '0' or 0 to nil for datetime fields Add test for restore Update readme Move MYSQL note to bottom of readme update destroyed? for sentinel value
Shaun Dern committed
-