scinote-web/app/models/wopi_app.rb

11 lines
348 B
Ruby
Raw Normal View History

2016-08-03 21:31:25 +08:00
class WopiApp < ActiveRecord::Base
belongs_to :wopi_discovery,
foreign_key: 'wopi_discovery_id',
class_name: 'WopiDiscovery'
has_many :wopi_actions,
class_name: 'WopiAction',
foreign_key: 'wopi_app_id',
dependent: :destroy
validates :name, :icon, :wopi_discovery, presence: true
end