You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we have this documentation internally in our README.
Empty Cells Implying Previous Cell
Suppose you have a table like thus:
id
name
1
a
*
b
where * is an empty cell, but it really implies “1”, the previous id.
You can memoize and point to the previous cell:
classProjectImportRowdefid# `#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)endend
want to implement this with a :carry_forward, :or_previous, :take_previous option---I'm open to other words.
The text was updated successfully, but these errors were encountered:
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_previous
option---I'm open to other words.The text was updated successfully, but these errors were encountered: