From 2c29a7ac195d9ffcc314186e5ac5ce131e161ac8 Mon Sep 17 00:00:00 2001 From: evazion Date: Sun, 14 May 2017 10:33:28 -0500 Subject: [PATCH] /artists: only include `domains` in /artists/1234.json, not /artists.json. --- app/controllers/artists_controller.rb | 9 +-------- app/models/artist.rb | 4 ---- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/app/controllers/artists_controller.rb b/app/controllers/artists_controller.rb index 8047370b0..3224a0c42 100644 --- a/app/controllers/artists_controller.rb +++ b/app/controllers/artists_controller.rb @@ -55,14 +55,7 @@ class ArtistsController < ApplicationController def show @artist = Artist.find(params[:id]) @post_set = PostSets::Artist.new(@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 + respond_with(@artist, methods: [:domains], include: [:urls]) end def create diff --git a/app/models/artist.rb b/app/models/artist.rb index 7b10c2e25..d6f286075 100644 --- a/app/models/artist.rb +++ b/app/models/artist.rb @@ -538,10 +538,6 @@ class Artist < ActiveRecord::Base super + [:other_names_index] end - def method_attributes - super + [:domains] - end - def legacy_api_hash return { :id => id,