venue_commercial association establihed

This commit is contained in:
Shriyansh 2016-04-03 19:25:41 +05:30
parent 1fdd029a86
commit 154f4a400c
3 changed files with 61 additions and 0 deletions

View file

@ -1,5 +1,6 @@
class Venue < ActiveRecord::Base
belongs_to :conference
has_one :commercial, as: :commercialable, dependent: :destroy
has_many :rooms, dependent: :destroy
before_create :generate_guid