def update_fields
      return true unless params[:fields] 
      params[:fields].each do |id, value|
        field = @post.post_fields.find_by(id: id)
        return false unless field
        return false unless update_field(field, value)
      end
      true
    end
def update_fields
      return true unless params[:fields] 
      params[:fields].each do |id, value|
        field = @post.post_fields.find_by(id: id)
        return false unless field
        return false unless update_field(field, value)
      end
      true
    end
Update fields helpers:
 **************************************************************************
 This function checks all fields params and update the value
 on the database for the field.