mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 13:16:28 +08:00
8 lines
271 B
Ruby
8 lines
271 B
Ruby
|
class UserMyModule < ActiveRecord::Base
|
||
|
validates :user, :my_module, presence: true
|
||
|
|
||
|
belongs_to :user, inverse_of: :user_my_modules
|
||
|
belongs_to :assigned_by, foreign_key: 'assigned_by_id', class_name: 'User'
|
||
|
belongs_to :my_module, inverse_of: :user_my_modules
|
||
|
end
|