mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
9 lines
307 B
Ruby
9 lines
307 B
Ruby
class Commercial < ActiveRecord::Base
|
|
belongs_to :commercialable, polymorphic: true
|
|
|
|
attr_accessible :commercial_id, :commercial_type
|
|
|
|
validates :commercial_id, :commercial_type, presence: true
|
|
|
|
validates :commercial_type, inclusion: { in: CONFIG['commercial_types'].values }, allow_blank: true
|
|
end
|