This commit is contained in:
albert
2010-10-08 18:42:26 -04:00
parent 6bc469b05d
commit f051e04550
88 changed files with 2865 additions and 699 deletions

View File

@@ -1,2 +1,17 @@
module ArtistsHelper
def link_to_artist(name)
artist = Artist.find_by_name(name)
if artist
link_to(artist.name, artist_path(artist))
else
link_to(name, new_artist_path(:name => name)) + " " + content_tag("span", "*", :class => "new-artist")
end
end
def link_to_artists(names)
names.map do |name|
link_to_artist(name)
end.join(", ").html_safe
end
end