def update_values # rubocop:disable Metrics/AbcSize
        # set the parameters of carrierwave_image at the end for validates.
        permitting = []
        dynamic_scaffold.form.items.reject {|i| i.type?(:carrierwave_image) }.each do |item|
          item.extract_parameters(permitting)
        end
        permitting.concat(dynamic_scaffold.form.permit_params)
        dynamic_scaffold.form.items.select {|i| i.type?(:carrierwave_image) }.each do |item|
          item.extract_parameters(permitting)
        end

        values = params
                   .require(dynamic_scaffold.model.name.underscore)
                   .permit(*permitting)

        if dynamic_scaffold.scope && !valid_for_scope?(values)
          raise DynamicScaffold::Error::InvalidOperation, "You can update only to #{scope_params} on this scope"
        end

        values
      end
def update_values # rubocop:disable Metrics/AbcSize
        # set the parameters of carrierwave_image at the end for validates.
        permitting = []
        dynamic_scaffold.form.items.reject {|i| i.type?(:carrierwave_image) }.each do |item|
          item.extract_parameters(permitting)
        end
        permitting.concat(dynamic_scaffold.form.permit_params)
        dynamic_scaffold.form.items.select {|i| i.type?(:carrierwave_image) }.each do |item|
          item.extract_parameters(permitting)
        end

        values = params
                   .require(dynamic_scaffold.model.name.underscore)
                   .permit(*permitting)

        if dynamic_scaffold.scope && !valid_for_scope?(values)
          raise DynamicScaffold::Error::InvalidOperation, "You can update only to #{scope_params} on this scope"
        end

        values
      end
Get paramters for update record.