search for: paying_scope

Displaying 1 result from an estimated 1 matches for "paying_scope".

2006 Aug 10
0
polymorphic challenge
Hello guys, I have 2 classes (I pasted small part of them here); class Shop < ActiveRecord::Base has_many :items, :as=> :itemable protected def self.paying_scope with_scope(:find => {:conditions => ''expires_on > NOW()'', :include => [:address]}) do yield end end end class Item < ActiveRecord::Base belongs_to :itemable, :polymorphic => true end Shops has expires_on field which I check if they can be sho...