helpers/common_helpers.rb
# Update columns in a particular row (or rows) in the grid.
# If more than one id is provided, all matching rows will
# receive the same changed values.
#
# @param ids [Integer/Array] the id or ids of the row(s) to update.
# @param changes [Hash] the changed columns and their values.
# @param notice [String/Nil] the flash message to show.
# @return [JSON] the changes to be applied.
Update columns in a particular row (or rows) in the grid.
If more than one id is provided, all matching rows will
receive the same changed values.
Update columns in a particular row ( or rows ) in the grid . If more than one id is provided all matching rows will receive the same changed values .
def update_grid_row(ids, changes:, notice: nil)
    res = action_update_grid_row(ids, changes: changes)
    res[:flash] = { notice: notice } if notice
    res.to_json
  end
def update_grid_row ( ids , changes : , notice : nil ) res = action_update_grid_row ( ids , changes : changes ) res [ :flash ] = { notice : notice } if notice res . to_json end
Update columns in a particular row (or rows) in the grid.
Update columns in a particular row ( or rows ) in the grid .
# res = { updateGridInPlace: Array(ids).map { |i| { id: make_id_correct_type(i), changes: changes } } }
the changes to be applied.
the changes to be applied .
JSON
ids
the id or ids of the row(s) to update.
the id or ids of the row ( s ) to update .
changes
the changed columns and their values.
the changed columns and their values .
notice
the flash message to show.
the flash message to show .