diff --git a/app/controllers/avo/base_controller.rb b/app/controllers/avo/base_controller.rb index f27488da21..83423e6962 100644 --- a/app/controllers/avo/base_controller.rb +++ b/app/controllers/avo/base_controller.rb @@ -253,7 +253,7 @@ def model_params end def permitted_params - @resource.get_field_definitions.select(&:updatable).map(&:to_permitted_param).concat extra_params + @resource.get_field_definitions.select(&:updatable).map(&:to_permitted_param).concat(extra_params).uniq end def extra_params diff --git a/lib/avo/concerns/has_fields.rb b/lib/avo/concerns/has_fields.rb index c56d2549be..9ebe43b014 100644 --- a/lib/avo/concerns/has_fields.rb +++ b/lib/avo/concerns/has_fields.rb @@ -98,6 +98,10 @@ def fields(only_root: false) if item.is_field? fields << item end + + if item.is_row? + fields << extract_fields_from_items(tab) + end end fields.flatten @@ -117,7 +121,7 @@ def extract_fields_from_items(thing) thing.items.each do |item| if item.is_field? fields << item - elsif item.is_panel? + elsif item.is_panel? || item.is_row? fields << extract_fields_from_items(item) end end