scinote-web/app/models/wopi_action.rb
2016-09-28 09:33:44 +02:00

12 lines
No EOL
323 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