Files
danbooru/app/helpers/artist_versions_helper.rb
2018-12-07 12:45:51 -06:00

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