mirror of
https://github.com/we-promise/sure.git
synced 2026-04-09 07:14:47 +00:00
* Fix NoMethodError when entry has nil entryable Guard against orphaned entries where the entryable record has been deleted but the entry still exists, preventing a crash on the account show page. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add dependent: :destroy to Entryable has_one :entry The polymorphic has_one :entry association lacked a dependent option, meaning if a Transaction/Trade/Valuation was ever deleted directly (bypassing the Entry), the Entry would be left orphaned with a nil entryable — causing NoMethodError in the activity feed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add nil entryable guard to _split_group.html.erb Same defensive check as _entry.html.erb for consistency. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
11 lines
396 B
Plaintext
11 lines
396 B
Plaintext
<%# locals: (split_group:) %>
|
|
<div class="split-group">
|
|
<%= render "transactions/split_parent_row", entry: split_group.parent %>
|
|
<% split_group.children.each do |child_entry| %>
|
|
<% if child_entry.entryable.present? %>
|
|
<%= render partial: child_entry.entryable.to_partial_path,
|
|
locals: { entry: child_entry, in_split_group: true } %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|