fixes #4064: Artist new page giving false rejection messages
This commit is contained in:
@@ -9,7 +9,7 @@ module ArtistsHelper
|
|||||||
if artist
|
if artist
|
||||||
link_to(artist.name, artist_path(artist))
|
link_to(artist.name, artist_path(artist))
|
||||||
else
|
else
|
||||||
link_to(name, new_artist_path(:name => name)) + " " + content_tag("span", "*", :class => "new-artist", :title => "No artist with this name currently exists.")
|
link_to(name, new_artist_path(artist: {name: name})) + " " + content_tag("span", "*", :class => "new-artist", :title => "No artist with this name currently exists.")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -329,7 +329,9 @@ class Artist < ApplicationRecord
|
|||||||
artist = Artist.new(params)
|
artist = Artist.new(params)
|
||||||
end
|
end
|
||||||
|
|
||||||
artist.tap(&:validate) # run before_validation callbacks to normalize the names
|
artist.normalize_name
|
||||||
|
artist.normalize_other_names
|
||||||
|
artist
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user