search for: acts_as_paranoid

Displaying 20 results from an estimated 47 matches for "acts_as_paranoid".

2005 Nov 15
1
acts_as_paranoid --> undefined method `constrain' for class `Class'
Hi All, So I thought I had this acts_as_paranoid problem previously and fixed by going to rails 0.14.2, although I''m not 100% it was the same thing. I''m now on rails 0.14.3 and I''m getting: undefined method `constrain'' for class `Class'' for any model that includes acts_as_paranoid. My application tr...
2006 Mar 14
2
acts_as_paranoid and :include
Will the find from acts_as_paranoid filter down to an :include? For instance class parent acts_as_paranoid has_many: children end and class child acts_as_paranoid belongs_to :parent end Then if you Parent.find(:all, :include => children) you will get all the children if they are deleted or not. I guess the find that filters...
2005 Nov 03
12
Installation of plugins/gems/mix-ins confusion
I''m running 0.14.2 and am a little confused as to the best way to install mix-ins. I''m specifically using "acts_as_paranoid" as an example (as it is one of the simpler implementations). It is a gem and can be "installed" as a gem, but then what''s the best way to integrate it into my app (require_gem?). I''ve seen recommendations to require it in the environment.rb file. But is that the be...
2005 Dec 11
4
Problem with acts_as_paranoid: "ArgumentError: Unknown key(s): group"
Here''s the full error: 1) Error: test_add_message_to_existing_ticket(TicketTest): ArgumentError: Unknown key(s): group /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.4/lib/active_support/core_ext/hash/keys.rb:48:in `assert_valid_keys'' /usr/lib/ruby/gems/1.8/gems/acts_as_paranoid-0.2/lib/acts_as_paranoid.rb:125:in `validate_find_options'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.1/lib/active_record/base.rb:1164:in `extract_options_from_args!'' /usr/lib/ruby/gems/1.8/gems/acts_as_paranoid-0.2/lib/acts_as_paranoid.rb:62:in `find'' /usr...
2008 Sep 25
1
Will acts_as_paranoid work with attachment_fu?
...39;'ve got a problem in that users are deleting a paranoid model through the application, including dependents. Some of these dependents are paranoid too, but not the attachments. (I''m using DB file storage.) I need to be able to un-delete these things and I''m now wondering if acts_as_paranoid will work with models that use attachment_fu? If so, in what model to I add the acts_as_paranoid bit, and do I need to override the acts_as_attachment model destroy methods? class Project < ActiveRecord::Base has_many :supporting_documents, :as => :documentable, :dependent => :destroy...
2006 May 11
0
acts_as_paranoid, aliasing and nested scopes in Rails 1.1
I have a real problem with the acts_as_paranoid plugin. The aliasing of find and so the nested scope does not seem to work at all, when combining it with similar plugins. The description: I made a copy of ''acts_as_paranoid'' in the plugin directory, renamed it to ''acts_as_very_new''(just a nonsense plugin fo...
2006 May 20
1
acts_as_paranoid overrides ActiveRecord::Base??
Guys, I am trying to figure out what exactly does this line do at the end of "acts_as_paranoid" plugin? ActiveRecord::Base.send :include, Caboose::Acts::Paranoid::ActiveRecord My problem: I have some classes that I use acts_as_paranoid, and others with tagging support. Classes declared as taggable, throw error, which appears to be in the acts_as_paranoid version of the "find&...
2008 Apr 17
4
acts_as_paranoid is making me crazy
Acts_as_paranoid is giving me a headache when performing migrations. For some reason when I perform a migration I get a "stack level too deep" error. If I comment out the database inserts that are performed (countries, regions, and a base admin) it works well. Even after minimizing the data that is inse...
2008 Feb 04
0
gettext and acts_as_paranoid gives stack overflow
HI all, I just started using acts_as_paranoid, and I''ve been using gettext for a while. Now I get the below errors when I run rake gettext:updatepo. It''s interesting that the errors seem to stack up, so the first file just errors on belongs_to_without_deleted, the second file has a layer of eval, the second has two layers of...
2007 Jan 28
0
problems with acts_as_paranoid (noticed while using acts_as_versioned)
hello, I''m using the trunk versions of both plugins. I''m running into this error when I run a migration to try and create the versioned table for the model ''Note'' stack level too deep /Users/Adam/dev/sweetspot/app/trunk/config/../vendor/plugins/ acts_as_paranoid/init.rb:5:in `belongs_to_without_deleted'' /Users/Adam/dev/sweetspot/app/trunk/config/../vendor/plugins/ acts_as_paranoid/init.rb:5:in `belongs_to_without_deleted'' /Users/Adam/dev/sweetspot/app/trunk/config/../vendor/plugins/ acts_as_paranoid/init.rb:5:in `belongs_to'' /Use...
2007 Jan 08
2
Two problems with Acts_as_paranoid
Hi, I''ve run into two small problems with acts_as_paranoid and wondered if anyone else has experienced them as well (and if yes, if they have any solutions). 1. When using has_many :through, AAP doesn''t seem to take into account the fact that your join model might also be paranoid. My solution to this at the moment is to add an explicit condition...
2006 Aug 16
0
acts_as_paranoid and alias_method_chain
when i require acts_as_paranoid I''m getting: undefined method `alias_method_chain'' for #<Class:ActiveRecord::Base> (NoMethodError) It happens in acts_as_paranoid''s init.rb. here''s the whole file. the alias_method_chain is near the bottom. please advise. class << ActiveRecord...
2006 May 11
1
acts_as_paranoid and nested scopes in Rails 1.1
I have a real problem with the acts_as_paranoid plugin. The find-scope nesting does not seem to work at all. The description: I made a copy of ''acts_as_paranoid'' in the plugin directory, renamed it to ''acts_as_very_new''(just nonsense plugin for testing), and just simplified the code: #---------------------...
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:...
2009 Oct 27
5
Re-tasking destroy contoller action...is this bad practice?
I''m trying to get some opinions on a design I''m floating ("rails way" or not?). Say I''ve got an Author model in my Blog application and I want my administrators to be able to disable authors. I don''t want to delete authors because this would cause data integrity issues (orphaned Author foreign key in the Post model). So my plan is to re- task the
2006 Jul 10
0
Strange acts_as_paranoid behavior
Using the acts_as_paranoid plugin with rails 1.1.4 (model also uses acts_as_threaded and acts_as_taggable) and getting some unexplainable behavior. The following tests: assert_equal Conv.count, num assert_equal Conv.count_with_deleted, CONVS_TOTAL Produce the following SQL: SQL (0.000000) SELECT count(*) AS count...
2008 Feb 12
0
acts_as_paranoid: has_one_paranoid
Hi all, Ran in to a problem with AR::B#find(:include) and acts_as_paranoid, well described here: http://www.ruby-forum.com/topic/57945 So I whipped up this thing, which seems to work for me: module ActiveRecord class Base def self.has_one_paranoid(*args) ref = create_has_one_reflection *args cond = args.last[:conditions] cond = cond.blank? ? ...
2007 Aug 03
0
acts_as_paranoid and Association Extensions (has_one troubles)
...oking 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: class Organization class Organization < ActiveRecord::Base acts_as_paranoid has_one :contact_address, :as => :addressable, :dependent => :destroy do def with_deleted ContactAddress.with_scope(:find => {:conditions => "addressable_id = #{proxy_owner.id}"}) do find_with_deleted(:all) end end end Loading development enviro...
2005 Dec 21
0
acts_as_paranoid updated for Rails 1.0
Just to let the folks that are tracking Acts as Paranoid know, I''ve updated it to v0.3.1 and verified it passes for 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:
2006 May 18
5
Overriding default DELETE behavior with logical deletes
Hello! I am trying to figure out how to implement *logical deletes* instead of physical deletes using ActiveRecord. Basically, in many applications that deal with E-Commerce, you really can''t physically delete almost anything, because records must be kept for auditing and customer service tracking purposes. In the past, I''ve implemented logical deletes as follows: 1.