Files
danbooru/app/helpers/artist_commentary_versions_helper.rb
BrokenEagle e23ee170f5 Add alternate comparison types to versions
- The types are:
-- Previous: The default and the previously used type
-- Subsequent: Compares against the next version
-- Current: Compares against the current version
- Allow switching between comparison types in index and diff views
-- Have links vary depending upon current comparison type
2020-03-17 18:31:20 +00:00

11 lines
321 B
Ruby

module ArtistCommentaryVersionsHelper
def commentary_version_field_diff(commentary_version, type, field)
other = commentary_version.send(params[:type])
if type == "previous"
diff_body_html(commentary_version, other, field)
else
diff_body_html(other, commentary_version, field)
end
end
end