scinote-web/app/models/wopi_app.rb

9 lines
320 B
Ruby
Raw Normal View History

2019-05-09 23:10:02 +08:00
# frozen_string_literal: true
2017-06-23 21:19:08 +08:00
class WopiApp < ApplicationRecord
2019-05-09 23:10:02 +08:00
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