def create
      upsert do
        # NOTE: create!() is not used because assign to @record to draw form.
        # Otherwise, @record would be in nil so failure at edgarj/_form rendering.
        #
        # NOTE2: valid? after create() calls validate_on_update.  This is not
        # an expected behavior.  So, new, valid?, then save.
        @record = model.new(permitted_params(:create))
        @record_saved = @record     # copy for possible later use
        on_upsert
       #upsert_files
        raise ActiveRecord::RecordNotSaved if !@record.valid?
        @record.save

        # clear @record values for next data-entry
        @record = model.new
      end
    end
def create
      upsert do
        # NOTE: create!() is not used because assign to @record to draw form.
        # Otherwise, @record would be in nil so failure at edgarj/_form rendering.
        #
        # NOTE2: valid? after create() calls validate_on_update.  This is not
        # an expected behavior.  So, new, valid?, then save.
        @record = model.new(permitted_params(:create))
        @record_saved = @record     # copy for possible later use
        on_upsert
       #upsert_files
        raise ActiveRecord::RecordNotSaved if !@record.valid?
        @record.save

        # clear @record values for next data-entry
        @record = model.new
      end
    end
save new record

 === Permission
 ModelPermission::CREATE on this controller is required.