- 16 Feb, 2015 2 commits
-
-
Jim committed
-
Add a mention for https://github.com/radar/paranoia/issues/109#issuecomment-74455252
Jim committed
-
- 09 Feb, 2015 1 commit
-
-
I think this advice is misleading for most datasets and most RDBMS this is not necessary, and as per #206 doesn't even work. I have moved it to the wiki https://github.com/radar/paranoia/wiki/Custom-sentinel-values
John Hawthorn committed
-
- 24 Jan, 2015 2 commits
-
-
John Hawthorn committed
-
John Hawthorn committed
-
- 22 Jan, 2015 19 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 -
John Hawthorn committed
-
John Hawthorn committed
-
This allows testing rails 4.0 on ruby 2.2
John Hawthorn committed -
John Hawthorn committed
-
John Hawthorn committed
-
John Hawthorn committed
-
John Hawthorn committed
-
We no longer have different behaviour between AR versions.
John Hawthorn committed -
We shouldn't be overriding this. soft-deleted objects are still persisted.
John Hawthorn committed -
The default implementation is already destroy || raise
John Hawthorn committed -
John Hawthorn committed
-
John Hawthorn committed
-
John Hawthorn committed
-
Thanks @kidlab
John Hawthorn committed -
John Hawthorn committed
-
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 -
John Hawthorn committed
-
- 21 Jan, 2015 1 commit
-
-
John Hawthorn committed
-
- 19 Jan, 2015 6 commits
-
-
Shreyas Agarwal committed
-
John Hawthorn committed
-
To ensure that we are using the association _type in our scope.
John Hawthorn committed -
John Hawthorn committed
-
If the association object is a has_one relationship with an :as option, it will have a type attribute (see https://github.com/rails/docrails/blob/master/activerecord/lib/active_record/reflection.rb#L280). If this type attributes is present, that will be the type column on the polymorphic model. The foreign key can be found as an attribute on the association object.
Patrick Koperwas 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 5 commits
-
-
Sergey Alekseev committed
-
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 -
Fix matcher compatibility with RSpec 2
John Hawthorn committed
-
- 09 Jan, 2015 1 commit
-
-
Ryan Bigg committed
-
- 23 Dec, 2014 1 commit
-
-
The changes in 40b7af58 were insufficient, this should do the trick.
Emil Sågfors committed
-
- 17 Dec, 2014 2 commits
-
-
Remove stranded asterisks.
Ryan Bigg committed -
Joshua Pinter committed
-