mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
dd27fadd98
* Add step reordering service endpoint to API [SCI-6891] * Generalize reorder validation [SCI-6891] * Add endpoint for reordering step elements, fix issues [SCI-6892] * Add appropriate serializers [SCI-6891][SCI-6892] * Add step elements to step serializer [SCI-6891] * Simplify routes, add locking [SCI-6891]
9 lines
256 B
Ruby
9 lines
256 B
Ruby
# frozen_string_literal: true
|
|
|
|
FactoryBot.define do
|
|
factory :step_orderable_element do
|
|
orderable { create :step_text, step: step }
|
|
step
|
|
position { step ? step.step_orderable_elements.count : Faker::Number.between(from: 1, to: 10) }
|
|
end
|
|
end
|