Forum: Ruby on Rails modify scope_condition in a model using acts_as_list

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Cc9dc380cf7f63603920910cf62736f9?d=identicon&s=25 Luis (Guest)
on 2007-07-10 05:55
(Received via mailing list)
Does anyone know how to modify the generated scope_condition method
that acts_as_list generates?

I need to change that method at different times during program
execution, but have been unable to do so.
Cc9dc380cf7f63603920910cf62736f9?d=identicon&s=25 Luis (Guest)
on 2007-07-10 07:31
(Received via mailing list)
On Jul 9, 11:55 pm, Luis <luis.ch...@gmail.com> wrote:
> Does anyone know how to modify the generated scope_condition method
> that acts_as_list generates?

Well, I realized how to do this, and it was a little obvious.

I simply copied the source of what acts_as_list does and changed the
class_eval method call to instance_eval (and removing everything
else).

e.g.
instance_eval scope_condition_method
This topic is locked and can not be replied to.