Topic: acts_as_paranoid on Rails 1.2.3

Does anyone have this working?

Looks like it breaks after rails 1.1
The workaround post for the "undefined method `scoped_methods='" issue has been removed. (I current issue.)

Does anyone have the workaround code?
Is there a better way to do this?

Thanks all,
Al

Re: acts_as_paranoid on Rails 1.2.3

I believe Rick now recommends using scope_out plugin instead of acts_as_paranoid. See this thread for details.

Railscasts - Free Ruby on Rails Screencasts

Re: acts_as_paranoid on Rails 1.2.3

Thanks ryan, this should work.


http://code.google.com/p/scope-out-rails/

svn checkout http://scope-out-rails.googlecode.com/svn/trunk/ scope-out-rails


Rick's example:

class Foo < AR::Base
  scope_out :enabled, :conditions => 'disabled_at is null'

  def enabled?
    disabled_at.nil?
  end

  def disabled?
    !enabled?
  end

  def disable
    update_attribute :disabled_at, Time.now.utc
  end
end

Foo.find_enabled(:all, :limit => 30, :offset => 60).each do |foo|

end