mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-22 14:54:38 +08:00
Add explicit ordering of items for repository columns [SCI-4317]
This commit is contained in:
parent
49bfb603c8
commit
8c5637a19c
1 changed files with 3 additions and 3 deletions
|
@ -5,9 +5,9 @@ class RepositoryColumn < ApplicationRecord
|
|||
belongs_to :created_by, foreign_key: :created_by_id, class_name: 'User'
|
||||
has_many :repository_cells, dependent: :destroy
|
||||
has_many :repository_rows, through: :repository_cells
|
||||
has_many :repository_list_items, dependent: :destroy, index_errors: true
|
||||
has_many :repository_status_items, dependent: :destroy, index_errors: true
|
||||
has_many :repository_checklist_items, dependent: :destroy, index_errors: true
|
||||
has_many :repository_list_items, -> { order('data ASC') }, dependent: :destroy, index_errors: true
|
||||
has_many :repository_status_items, -> { order('status ASC') }, dependent: :destroy, index_errors: true
|
||||
has_many :repository_checklist_items, -> { order('data ASC') }, dependent: :destroy, index_errors: true
|
||||
|
||||
accepts_nested_attributes_for :repository_status_items, allow_destroy: true
|
||||
accepts_nested_attributes_for :repository_list_items, allow_destroy: true
|
||||
|
|
Loading…
Reference in a new issue