Implement controller and view to edit uploaded transactions directly
stadelmanma opened this issue · 2 comments
stadelmanma commented
This snippet below will populate all of the child models from a parent. I think I can use this code for when I want to modify transactions in a given upload
<p>
<%= f.fields_for(:ledger_uploads) do |upload| %>
<%= upload.label :data_source %>
<br>
<%= upload.text_field :data_source %>
<% end %>
</p>
This snippet could allow deletions
<%= person_form.fields_for :projects do |project_fields| %>
Delete: <%= project_fields.check_box :_destroy %>
<% end %>
stadelmanma commented
Actually, I only want to 'soft-delete' transactions from an upload, but I can still use similar logic.
stadelmanma commented
When I create the transactions _form.erb
partial I want a mix of text fields and select inputs. Current candidates for 'select' inputs are account, category and validated.
I may make separate tables for account and category and then use foreign keys to link the two. This prevents accidental typos and allows some additional reporting flexibility in the future.