scinote-web/app/models/marvin_js_asset.rb
2019-04-26 22:59:38 +02:00

13 lines
331 B
Ruby

class MarvinJsAsset < ApplicationRecord
belongs_to :object, polymorphic: true,
optional: true,
inverse_of: :marvin_js_assets
belongs_to :team, inverse_of: :marvin_js_assets, optional: true
def self.add_sketch(values,team)
create(values.merge({team_id: team.id}))
end
end