Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
# Unable to find a last bonus, no bonuses in period
return since_date
end
# Unable to find a last bonus, no bonuses in period
return since_date
end
protected
def validate
errors.add(:rentable_id, "is not in the database") if rentable.nil?
protected
def validate
errors.add(:rentable_id, "is not in the database") if rentable.nil?
class Rentable < ActiveRecord::Base
has_many :coitems
has_many :rentable_purchases
class Rentable < ActiveRecord::Base
has_many :coitems
has_many :rentable_purchases
+ has_many :bonus_purchases
validates_presence_of :title
# don't validate newrelease, false is ok
validates_presence_of :title
# don't validate newrelease, false is ok