- Added a changes column explicitly listing all of the changes -- This makes it more in line with the other version views now - Does a symmetric difference on the array fields to detect changes
18 lines
551 B
Ruby
18 lines
551 B
Ruby
module ArtistVersionsHelper
|
|
def artist_version_other_names_diff(artist_version)
|
|
new_names = artist_version.other_names
|
|
old_names = artist_version.previous.try(:other_names)
|
|
latest_names = artist_version.artist.other_names
|
|
|
|
diff_list_html(new_names, old_names, latest_names)
|
|
end
|
|
|
|
def artist_version_urls_diff(artist_version)
|
|
new_urls = artist_version.urls
|
|
old_urls = artist_version.previous.try(:urls)
|
|
latest_urls = artist_version.artist.urls.map(&:to_s)
|
|
|
|
diff_list_html(new_urls, old_urls, latest_urls)
|
|
end
|
|
end
|