mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-10 08:55:03 +08:00
10 lines
299 B
Ruby
10 lines
299 B
Ruby
|
class SamplesTable < ActiveRecord::Base
|
||
|
validates :user, :organization, presence: true
|
||
|
|
||
|
belongs_to :user, inverse_of: :samples_tables
|
||
|
belongs_to :organization, inverse_of: :samples_tables
|
||
|
|
||
|
scope :find_status,
|
||
|
->(org, user) { where(user: user, organization: org).pluck(:status) }
|
||
|
end
|