options for cards and new card styles

This commit is contained in:
2022-12-05 18:14:56 +02:00
parent 6911540d30
commit f11bf318a5
20 changed files with 125 additions and 48 deletions

View File

@ -40,12 +40,15 @@ module Merged
def update
@card.allowed_fields.each do |key|
puts "Update Card #{key}"
if( params.has_key?(key) )
@card.update(key, params[key])
puts "updating:#{key}=#{params[key]}"
end
end
options = params[:option]
@card.option_definitions.each do |option|
@card.set_option(option.name, options[option.name])
end if options
@card.save
redirect_to section_cards_url(@card.section.id)
end

View File

@ -69,7 +69,6 @@ module Merged
def update
@section.allowed_fields.each do |key|
puts "Update Section #{key}"
if( params.has_key?(key) )
@section.update(key, params[key])
puts "updating:#{key}=#{params[key]}"