Changeset 1343
- Timestamp:
- 08/12/08 19:20:39 (3 months ago)
- Files:
-
- trunk/app/models/episode.rb (modified) (2 diffs)
- trunk/db/migrate/20080811170405_add_rating.rb (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/app/models/episode.rb
r1318 r1343 1 1 class Episode < ActiveRecord::Base 2 2 acts_as_taggable 3 acts_as_rated 3 4 4 5 named_scope :broadcasted, lambda { {:conditions => ["broadcasted_at < ?", Time.now] } } 5 6 named_scope :not_broadcasted, lambda { {:conditions => ["broadcasted_at > ?", Time.now] } } 6 7 7 liquid_methods :show, :title, :description, :image, :contents, :broadcasted_at, :tags 8 liquid_methods :show, :title, :description, :image, :contents, :broadcasted_at, :tags, :rating_count, :rating_total, :rating_avg 8 9 9 10 validates_presence_of :order, :message => "Pas de numéro défini" … … 35 36 end 36 37 38 def vote_tag 39 view.rate_tag(@object) 40 end 41 37 42 def tags 38 43 @object.tag_list
