mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-06 15:40:31 +08:00
14 lines
331 B
Ruby
14 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
|