Displaying 20 results from an estimated 500 matches similar to: "acts_as_paranoid overrides ActiveRecord::Base??"
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''
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''
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 trace is below.
Has anyone else got this and know a
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 out the deleted_at is null does not filter down to the includes
2008 Sep 25
1
Will acts_as_paranoid work with attachment_fu?
I''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
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''
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::Base
def belongs_to_with_deleted(association_id, options = {})
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 inserted on the migration to one record it
still throws the same error.
When running
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 for testing), and
simplified the code (original code
2006 Mar 27
2
:through and STI
Hi,
I''m trying to use :through and STI using the trunk version of Rails, but
I get the following error see bottom of this msg[1]
here are my classes.
class Player < ActiveRecord::Base
end
class Ladder < ActiveRecord::Base
has_many :subscriptions
has_many :players, :through => :subscriptions
end
class SingleLadder < Ladder
end
class Subscription <
2007 Aug 15
2
has_many :through ... What am I missing?
class Ladder < ActiveRecord::Base
has_many :players
has_many :users, :through => :players
end
class Player < ActiveRecord::Base
belongs_to :users
belongs_to :ladders
end
class User < ActiveRecord::Base
has_many :players
has_many :ladders, :through => :players
end
When I try the following code (on the console) I get an error:
@ladder = Ladder.find(1)
@ladder.users
I
2006 Apr 06
4
Record retrieval in Many-to-many using :through not working
Hello,
I get an error while retrieving records from the following model structure.
Tables
foods - id, food
foodallergies - food_id, symptom_id, a few other columns
symptoms - id, symptom
Models
class Food < ActiveRecord::Base
has_many :foodallergies
has_many :symptoms, :through => :foodallergies
end
class Symptom < ActiveRecord::Base
has_many :foodallergies
has_many :foods,
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 conditions clause to the
has_many
2008 Oct 14
1
Starting Server gives an error
Hi,
I had created a new environment and tried to start the webrick server
for that environment but it is giving an error:-
E:/demo/vendor/rails/railties/lib/commands/servers/
webrick.rb:11: warning: already initialized constant OPTIONS
E:/demo/vendor/rails/activesupport/lib/active_suppo
rt/dependencies.rb:249:in `load_missing_constant'': Expected E:/Demo
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 eval, and so forth.
I''ve tried for a while
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:
#--------------------------------------------------------------
module
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_all FROM convs WHERE ((
convs.deleted_at IS NULL OR convs.deleted_at
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? ? '''' : cond
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
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