mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-04 06:36:27 +08:00
9 lines
339 B
Ruby
9 lines
339 B
Ruby
class WopiAction < ActiveRecord::Base
|
|
belongs_to :wopi_app, foreign_key: 'wopi_app_id', class_name: 'WopiApp'
|
|
validates :action, :extension, :urlsrc, :wopi_app, presence: true
|
|
|
|
def self.find_action(extension, activity)
|
|
WopiAction.distinct
|
|
.where('extension = ? and action = ?', extension, activity).first
|
|
end
|
|
end
|