- 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 2 commits
-
-
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 -
This reverts commit 566b1cbd. Conflicts: README.md test/paranoia_test.rb
Aaron Jensen committed
-
- 29 Jul, 2014 1 commit
-
-
astronz committed
-
- 28 Jul, 2014 2 commits
-
-
Fixes #149
Neil E. Pearson committed -
Fixes #148
Michael Tucker committed
-
- 08 Jul, 2014 1 commit
-
-
Fixes #143
Martin Sereinig committed
-
- 25 Jun, 2014 1 commit
-
-
Fixes #138
n3bulous committed
-
- 13 Jun, 2014 1 commit
-
-
Removed deprecated assert_nothing_raised from test.
Matthew Jording committed
-
- 19 Apr, 2014 1 commit
-
-
when the model has_one use class_name or foreign_key, restore use class_name or setting the foreign_key.
ray committed
-
- 08 Apr, 2014 3 commits
- 13 Mar, 2014 1 commit
-
-
ray committed
-
- 11 Mar, 2014 1 commit
-
-
* Based on partial fix by @stupergenius * Handles nil case for hasOne associations Fixes #119
Dave Mayo committed
-
- 30 Jan, 2014 1 commit
-
-
Rails normally returns the model on successful destroy and false if any callback fails. Fixes #104
Vincent Bonmalais committed
-
- 09 Jan, 2014 1 commit
-
-
Fixes #95
Washington Luiz committed
-
- 03 Jan, 2014 1 commit
-
-
As per #92
Ryan Bigg committed
-