only move cards within same page

This commit is contained in:
2023-01-25 15:16:32 +02:00
parent bafe142a3b
commit 594f2b5dce
5 changed files with 25 additions and 120 deletions

View File

@ -2,8 +2,9 @@ module Merged
module CardsHelper
include ViewHelper #for previews
def card_section_select
Section.where.not(card_template: "").collect{|s| ["#{s.page&.name}: #{s.header}" , s.id]}
def card_section_select(card)
card_sections = card.section.page.sections.where.not(card_template: "")
card_sections.collect{|s| [s.header , s.id]}
end
end
end