Guest User

Untitled

a guest
Aug 19th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. class Series < ActiveRecord::Base
  2. belongs_to :user
  3. belongs_to :language
  4. belongs_to :media_rating
  5.  
  6. has_many :series_people
  7. has_many :people, :through => :series_people
  8.  
  9. attr_accessible :title, :subtitle, :description, :display_date, :enable_user_comments, :enable_user_rating
  10. attr_accessible :copyright, :public_email, :completed
  11. attr_accessible :user_id, :language_id, :media_rating_id, :series_id, :series_people, :series_people_attributes
  12.  
  13. accepts_nested_attributes_for :series_people, :allow_destroy => true
  14.  
  15. scope :overview, order("display_date DESC")
  16.  
  17. end
Add Comment
Please, Sign In to add comment