Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Party < ActiveRecord::Base
- validates_presence_of :game_id, :account_id
- belongs_to :game
- belongs_to :account
- has_many :players, :dependent => :destroy
- has_many :sub_parties, :dependent => :destroy, :class_name => "Party"
- accepts_nested_attributes_for :sub_parties
- after_create :up_partie_cache, :update_played_date
- after_destroy :down_partie_cache
- //parties methods here
- end
Add Comment
Please, Sign In to add comment