If you want to fix the ads to show correctly you have to modify
Ad.display to look like this.
I think the start_date logical comparisons were incorrect.
def self.display(location, logged_in = false)
return nil if location.blank?
ads = find(:all,
:conditions => ["location = ?
AND published = ?
AND (time_constrained = ? OR (start_date < ? AND end_date
> ?))
AND (audience IN (?) )",
location.to_s, true, false, Time.now, Time.now, audiences_for
(logged_in) ])
ad = random_weighted(ads.map{|a| [a, a.frequency] })
ad ? ad.html : ''
end
--
You received this message because you are subscribed to the Google Groups
"CommunityEngine" 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/communityengine?hl=en.