we have this documentation internally in our README.
Empty Cells Implying Previous Cell
Suppose you have a table like thus:
where * is an empty cell, but it really implies “1”, the previous id.
You can memoize and point to the previous cell:
class ProjectImportRow
def id
# `#previous` is from `csv_row_model`
# memoize because `previous.previous` is always `nil`, otherwise `csv_row_model` creates a linked list
@id ||= original_attribute(:id) || previous.try(:id)
end
end
want to implement this with a :carry_forward, :or_previous, :take_previous option---I'm open to other words.
we have this documentation internally in our README.
Empty Cells Implying Previous Cell
Suppose you have a table like thus:
where * is an empty cell, but it really implies “1”, the previous
id.You can memoize and point to the previous cell:
want to implement this with a
:carry_forward,:or_previous,:take_previousoption---I'm open to other words.