search for: with_delet

Displaying 9 results from an estimated 9 matches for "with_delet".

Did you mean: with_deleted
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....
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 s...
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''
2006 Aug 16
0
acts_as_paranoid and alias_method_chain
...ndefined 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 = {}) with_deleted = options.delete :with_deleted returning belongs_to_without_deleted(association_id, options) do if with_deleted reflection = reflect_on_association(association_id) association_accessor_methods(reflection, C...
2007 Jan 28
0
problems with acts_as_paranoid (noticed while using acts_as_versioned)
...ersioned'' /Users/Adam/dev/sweetspot/app/trunk/config/../app/models/note.rb:2 All note.rb contains is this: class Note < ActiveRecord::Base acts_as_versioned end looking at the code in acts_as_paranoid, I can''t figure out why it is getting stuck in a loop: def belongs_to_with_deleted(association_id, options = {}) with_deleted = options.delete :with_deleted returning belongs_to_without_deleted(association_id, options) do if with_deleted reflection = reflect_on_association(association_id) association_accessor_methods(reflection, Caboose...
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
2006 Mar 02
4
Getting Acts_as_Paranoid to work with validates_uniqueness_of
Hello I''ve been using Acts_as_Parnoid for a while and it has been working well but I am now having a slight issue with it. I have a company table were I would like to use validates_uniqueness_of :company_name. This validation works if a company exists in the database and has not been deleted. However, I also would like the validates_uniqueness_of to work if a company has
2009 May 19
0
Extending finders to include a session variable as an option??
We have a Page model which acts_as_paranoid. AAP modifies ActiveRecord finders to ignore any records marked as deleted unless the :with_deleted => true option is supplied. We have a UI element which allows users to toggle whether or not to display deleted Pages, their current setting being stored in a session variable, session[:show_deleted]. What we would like is to automagically have :with_deleted => session [:show_deleted] app...
2006 Mar 02
17
can''t get rails to connect to mySQL - HELP!!!!!!!!!
Sorry, but this is really NOT as easy as the tutorials/books make out. I''m really struggling at the first hurdle here. And while I''m not a programmer by design I do know my way around most stuff. And if I can''t get this to work I suspect more people will have the same issues. There seems to be too many variables to address. I have winXP, I have ruby and rails all