Skip to content

Commit

Permalink
Remove document accessor from json response.
Browse files Browse the repository at this point in the history
document was added as an accessor in 02f4d26.
However, when we render availability as json this puts a SolrDocument in every item in the holdings.
For records with a lot of items this blows that json response's size up to a huge amount.
  • Loading branch information
jkeck committed Nov 13, 2018
1 parent 0b6737b commit 931ef8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/holdings/callnumber.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def live_status?
end

def as_json(*)
methods = (public_methods(false) - [:as_json, :status, :current_location])
methods = (public_methods(false) - [:as_json, :status, :current_location, :document])
callnumber_info = methods.each_with_object({}) do |meth, obj|
obj[meth.to_sym] = send(meth) if method(meth).arity == 0
end
Expand Down

0 comments on commit 931ef8b

Please sign in to comment.