Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/proposal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class Proposal < ApplicationRecord
serialize :last_change, coder: YAML
serialize :proposal_data, type: Hash, coder: YAML

has_paper_trail only: %i[title abstract details pitch]
has_paper_trail only: %i[title abstract details pitch], versions: { inverse_of: :item }

attr_accessor :updating_user
attr_writer :tags, :review_tags
Expand Down
8 changes: 5 additions & 3 deletions app/views/staff/proposal_reviews/_reviewer_contents.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@
- proposal.versions.each.with_index(1) do |version, index|
%details.diff-view{ open: index == proposal.versions.size }
%summary= version.created_at.to_fs(:day_at_time)
- version.changeset.each do |k, (old, new)|
%h3.control-label= k.titleize
%div= diff old, new
-# Versions are immutable, so the rendered diff can be cached forever.
- cache version do
- version.changeset.each do |k, (old, new)|
%h3.control-label= k.titleize
%div= diff old, new

:css
= #{Diffy::CSS}
Loading