Displaying 6 results from an estimated 6 matches for "find_with_delet".
Did you mean:
find_with_deleted
2007 Aug 03
0
acts_as_paranoid and Association Extensions (has_one troubles)
Hi... Isn''t there a proper way or hack/workaround for the following?
* For the example with unfortunate disabilities.. look below,,,
Usage of has_* (associationmethods) do {def with_deleted
AccociatedModel#with_scope} {Paranoid''s#find_with_deleted}...
The has_one associations give me a nil object when invoking it with
Model.association_OBJECT.with_deleted. Has_many does like expected:
Model.association_COLLECTION.with_deleted.
* Example:
The disability of my approach you see below after the lines with
########### signs..
First on to: clas...
2006 May 11
0
acts_as_paranoid, aliasing and nested scopes in Rails 1.1
...-------END
In a controller I did the following calls:
Book.find(:all)
# SQL: SELECT * FROM books WHERE ((books.updated_at > ''2006-05-08
11:38:33'') AND (books.deleted_at IS NULL))
Book.find_with_old(:all)
# SQL: SELECT * FROM books WHERE (books.deleted_at IS NULL)
Book.find_with_deleted(:all)
# SQL: SELECT * FROM books
Isn''t is strange? Shouldn''t "Book.find_with_deleted(:all)" generate a
"WHERE (books.updated_at > ''2006-05-08 11:38:33'')" condition? The
problem seems to be in aliasing of find. When I switch the call o...
2008 Apr 15
1
acts_as_paranoid Unknown key(s): with_deleted
Trying this straight from the README:
I have acts_as_paranoid in my model (Course), and added the deleted_at
column.
This is OK:
Course.find_with_deleted(:all)
Course.find(:all, :with_deleted => true)
gives:
ArgumentError: Unknown key(s): with_deleted
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/core_ext/hash/keys.rb:49:in `assert_valid_keys''
from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.0....
2006 Mar 27
3
act_as_paranoid and model references
I''m using act_as_paranoid plugin for most of my models. One of the
reasons was that I didn''t want to break references between objects
after I "deleted" an object. One of the cases was to know which user
modified something even after I deleted the user.
My problem now is that I cannot access the user after it was deleted
if I use the :has_and_belongs_to :user
2005 Dec 21
0
acts_as_paranoid updated for Rails 1.0
...r Rails 1.0. I had to
remove the code that lets deleted items select associated deleted
items unfortunately. It overwrote too much in the base association
classes and caused some breakage. I say if you want to use your
deleted models, undelete them and use them. Or:
@deleted_project.developers.find_with_deleted(:all, ....)
--
rick
http://techno-weenie.net
ANNOUNCE: act_as_soft_deletable - new rails plugin for soft deleting / disabling ActiveRecord models
2008 May 15
13
ANNOUNCE: act_as_soft_deletable - new rails plugin for soft deleting / disabling ActiveRecord models
Acts_as_soft_deletable is a rails plugin that provides the ability to
soft delete or disable models.
When models are destroyed, they will be archived so that they can
later be restored easily. Its similar to acts_as_paranoid but uses a
different approach that should make it a little more foolproof.
See the README at the following url for a better description.
github url: