- 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
11 lines
321 B
Ruby
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
|