mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Introducing delegation for city and country name (Conference - Venue
Using ActiveSupport delegate macro.
This commit is contained in:
parent
f50a92bf53
commit
fd2635509f
2 changed files with 45 additions and 0 deletions
|
|
@ -25,6 +25,9 @@ class Conference < ApplicationRecord
|
|||
has_one :email_settings, dependent: :destroy
|
||||
has_one :program, dependent: :destroy
|
||||
has_one :venue, dependent: :destroy
|
||||
delegate :city, :country_name, to: :venue, allow_nil: true
|
||||
delegate :name, :street, to: :venue, prefix: true, allow_nil: true
|
||||
|
||||
has_many :physical_tickets, through: :ticket_purchases
|
||||
has_many :ticket_purchases, dependent: :destroy
|
||||
has_many :payments, dependent: :destroy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue