mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
7 lines
253 B
Ruby
7 lines
253 B
Ruby
class SampleComment < ActiveRecord::Base
|
|
validates :comment, :sample, presence: true
|
|
validates :sample_id, uniqueness: { scope: :comment_id }
|
|
|
|
belongs_to :comment, inverse_of: :sample_comment
|
|
belongs_to :sample, inverse_of: :sample_comments
|
|
end
|