Changeset 1343

Show
Ignore:
Timestamp:
08/12/08 19:20:39 (3 months ago)
Author:
alban
Message:

acts_as_rated sur Episode. Refs #19

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app/models/episode.rb

    r1318 r1343  
    11class Episode < ActiveRecord::Base 
    22  acts_as_taggable 
     3  acts_as_rated 
    34 
    45  named_scope :broadcasted, lambda { {:conditions => ["broadcasted_at < ?", Time.now] } } 
    56  named_scope :not_broadcasted, lambda { {:conditions => ["broadcasted_at > ?", Time.now] } } 
    67 
    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 
    89 
    910  validates_presence_of :order, :message => "Pas de numéro défini" 
     
    3536  end 
    3637 
     38  def vote_tag 
     39    view.rate_tag(@object) 
     40  end 
     41 
    3742  def tags 
    3843    @object.tag_list