mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 15:13:21 +08:00
11 lines
389 B
Ruby
11 lines
389 B
Ruby
class MyModuleRepositoryRow < ApplicationRecord
|
|
belongs_to :assigned_by,
|
|
foreign_key: 'assigned_by_id',
|
|
class_name: 'User',
|
|
optional: true
|
|
belongs_to :repository_row, optional: true
|
|
belongs_to :my_module, optional: true
|
|
|
|
validates :repository_row, :my_module, presence: true
|
|
validates :repository_row, uniqueness: { scope: :my_module }
|
|
end
|