mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-09 17:09:45 +08:00
9 lines
299 B
Ruby
9 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
|