0
我在用户模式下named_scope:命名范围扩展 - 调用方法做外块
named_scope :all_stars, :joins => [:all_stars] do
def overall
self.find(:all, :conditions => ['recordable_type = ?', 'User'])
end
end
我想这样做:
named_scope :all_stars, :joins => [:all_stars] do
def overall
overall_all_stars_condition
end
end
def overall_all_stars_condition
self.find(:all, :conditions => ['recordable_type = ?', 'User'])
end
能不能做到?