- 07 Apr, 2015 3 commits
-
-
Nikolay Norkin committed
-
Nikolay Norkin committed
-
Nikolay Norkin committed
-
- 23 Mar, 2015 1 commit
-
-
Ryan Bigg committed
-
- 18 Feb, 2015 1 commit
-
-
This has been removed and should no longer exist. https://github.com/radar/paranoia/pull/192#discussion_r24884921
Sergey Alekseev committed
-
- 17 Feb, 2015 5 commits
-
-
This will allow to detect counter cached columns changes in callbacks like `after_destroy` or `after_commit on: :destroy`.
Sergey Alekseev committed -
This is a workaround actually. Since `ActiveRecord::CounterCache.each_counter_cached_associations` is private. We shouldn’t use it. Proposals for the proper fix are welcome. The reason the previous version stopped working is `affected_rows` returns `0` at [active_record/counter_cache.rb#L142](https://github.com/rails/rails/blo b/ef99d4cd3ecc58a8c1484740b2fb5447dbda23ab/activerecord/lib/active_recor d/counter_cache.rb#L142). If you follow the method call you’ll find that it’s called at [active_record/persistence.rb#L486](https://github.com/rails/rails/blob/ ef99d4cd3ecc58a8c1484740b2fb5447dbda23ab/activerecord/lib/active_record/ persistence.rb#L486). Probably we’d better override the return value in `ActiveRecord::Relation.delete_all` at [active_record/relation.rb#L481](https://github.com/rails/rails/blob/ef9 9d4cd3ecc58a8c1484740b2fb5447dbda23ab/activerecord/lib/active_record/rel ation.rb#L481).
Sergey Alekseev committed -
https://github.com/radar/paranoia/blame/1b051ae78793f3b62297b5adbaa9c1d0 0e6726e0/README.md#L154
Sergey Alekseev committed -
http://edgeguides.rubyonrails.org/4_2_release_notes.html#active-record-d eprecations > Deprecated passing Active Record objects to .find or .exists?. Call id on the objects first. Commits in Rails: https://github.com/rails/rails/commit/d92ae6ccca3bcfd73546d612efaea01127 0bd270 https://github.com/rails/rails/commit/d35f0033c7dec2b8d8b52058fb8db495d4 9596f7 https://github.com/rails/rails/commit/c0609dd0f0f0de604ac1ffeffdf5e3e0e7 356b35
Sergey Alekseev committed -
Sergey Alekseev committed
-
- 24 Jan, 2015 1 commit
-
-
John Hawthorn committed
-
- 22 Jan, 2015 13 commits
-
-
John Hawthorn committed
-
John Hawthorn committed
-
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
-
- 19 Jan, 2015 3 commits
-
-
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
-
- 23 Dec, 2014 1 commit
-
-
The changes in 40b7af58 were insufficient, this should do the trick.
Emil Sågfors committed
-
- 03 Dec, 2014 1 commit
-
-
John Hawthorn committed
-
- 28 Nov, 2014 1 commit
-
-
FIX: where("association_id", id) leads to invalid statement in postgres. where should just be given a hash.
Martin Sereinig committed
-
- 27 Nov, 2014 1 commit
-
-
This reverts commit 4004bd5e.
John Hawthorn committed
-
- 26 Nov, 2014 2 commits
-
-
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
-
- 13 Nov, 2014 1 commit
-
-
see https://github.com/radar/paranoia/issues/169
Braden Anderson committed
-
- 23 Sep, 2014 1 commit
-
-
refs https://github.com/radar/paranoia/issues/102
Georg Limbach committed
-
- 04 Sep, 2014 2 commits
-
-
Alexey Pokhozhaev committed
-
Alexey Pokhozhaev committed
-
- 28 Aug, 2014 1 commit
-
-
Emil Sågfors committed
-