This commit is contained in:
albert
2013-04-03 17:27:41 -04:00
parent b19994396d
commit cf6fd1af64
2 changed files with 9 additions and 2 deletions

View File

@@ -42,7 +42,14 @@ class ArtistsController < ApplicationController
def show def show
@artist = Artist.find(params[:id]) @artist = Artist.find(params[:id])
@post_set = PostSets::Artist.new(@artist) @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 end
def create def create

View File

@@ -67,7 +67,7 @@ class Artist < ActiveRecord::Base
end end
def other_names_array def other_names_array
other_names.try(:split, / /) other_names.try(:split, /\s/)
end end
def other_names_comma def other_names_comma