Hey all,

Imagine I'm writing a weblog with a RSS feeds. I only want the active
articles to be in the RSS feed. Articles have a fairly complex method to
define whether they active, which is pretty hard to convert to find
attributes. Besides, I already have defined that method...
So, is there a way to use instance methods in a named_scope? Something
like

named_scope :rss, :order => "created_at DESC", :limit => 25, :if =>
Proc.new { |a| a.active? }

thanks!
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to