- 19 Jan, 2015 3 commits
-
-
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
-
- 03 Dec, 2014 3 commits
-
-
John Hawthorn committed
-
John Hawthorn committed
-
John Hawthorn committed
-
- 28 Nov, 2014 3 commits
-
-
Change-Id: Ib73e43a5adcb8bd9b5bbf5b7ca60f9865e5415e7
John Hawthorn committed -
Martin Sereinig committed
-
FIX: where("association_id", id) leads to invalid statement in postgres. where should just be given a hash.
Martin Sereinig committed
-
- 27 Nov, 2014 2 commits
-
-
Add paranoia_scope as named version of default_scope
John Hawthorn committed -
This reverts commit 4004bd5e.
John Hawthorn committed
-
- 26 Nov, 2014 4 commits
-
-
John Hawthorn committed
-
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
-
- 23 Nov, 2014 1 commit
-
-
Jozsef Nyitrai committed
-
- 21 Nov, 2014 1 commit
-
-
Ryan Bigg committed
-
- 19 Nov, 2014 1 commit
-
-
raise error for acts_as_paranoid on models without primary keys
Ryan Bigg committed
-
- 13 Nov, 2014 1 commit
-
-
see https://github.com/radar/paranoia/issues/169
Braden Anderson committed
-
- 23 Sep, 2014 2 commits
-
-
Fix usage of paranoia_column in related models
Ryan Bigg committed -
refs https://github.com/radar/paranoia/issues/102
Georg Limbach committed
-
- 19 Sep, 2014 1 commit
-
-
Add compatibility info for rails4
Ryan Bigg committed
-
- 18 Sep, 2014 1 commit
-
-
Dharam Gollapudi committed
-
- 16 Sep, 2014 2 commits
- 08 Sep, 2014 1 commit
-
-
Clear association cache
Ryan Bigg committed
-
- 04 Sep, 2014 2 commits
-
-
Alexey Pokhozhaev committed
-
Alexey Pokhozhaev committed
-
- 29 Aug, 2014 1 commit
-
-
Fix RSpec 3.x deprecations
Ryan Bigg committed
-
- 28 Aug, 2014 2 commits
-
-
Emil Sågfors committed
-
Emil Sågfors committed
-