Named_scope with instance methods

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

named_scope :rss, :order => “created_at DESC”, :limit => 25, :if => { |a| }


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs