mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-14 05:05:55 +08:00
8 lines
241 B
Ruby
8 lines
241 B
Ruby
|
class StepComment < ActiveRecord::Base
|
||
|
validates :comment, :step, presence: true
|
||
|
validates :step_id, uniqueness: { scope: :comment_id }
|
||
|
|
||
|
belongs_to :comment, inverse_of: :step_comment
|
||
|
belongs_to :step, inverse_of: :step_comments
|
||
|
end
|