diff --git a/app/controllers/artists_controller.rb b/app/controllers/artists_controller.rb index 977e420aa..46c8d4343 100644 --- a/app/controllers/artists_controller.rb +++ b/app/controllers/artists_controller.rb @@ -42,7 +42,14 @@ class ArtistsController < ApplicationController def show @artist = Artist.find(params[:id]) @post_set = PostSets::Artist.new(@artist) - respond_with(@artist) + respond_with(@artist) do |format| + format.xml do + render :xml => @artist.to_xml(:include => [:urls]) + end + format.json do + render :json => @artist.to_json(:include => [:urls]) + end + end end def create diff --git a/app/models/artist.rb b/app/models/artist.rb index 6ff64f8cf..7b9643b6e 100644 --- a/app/models/artist.rb +++ b/app/models/artist.rb @@ -67,7 +67,7 @@ class Artist < ActiveRecord::Base end def other_names_array - other_names.try(:split, / /) + other_names.try(:split, /\s/) end def other_names_comma