Matchu
a31039c4c8
Just moving more stuff over! I modernized Item's `as_json` method while I was here. (Note that I removed the NC/own/want fields, because I think the only other place this method is still called from is the quick-add feature on the closet lists page, and I think it doesn't use these fields to do anything: updating the page is basically a full-page reload, done sneakily.)
8 lines
207 B
Ruby
8 lines
207 B
Ruby
class ItemAppearancesController < ApplicationController
|
|
def index
|
|
@item = Item.find(params[:item_id])
|
|
render json: @item.as_json(
|
|
only: [:id], methods: [:appearances, :restricted_zones]
|
|
)
|
|
end
|
|
end
|