impress/app/controllers/item_appearances_controller.rb
Matchu a31039c4c8 Load item page restricted zones data from Rails app, not impress-2020
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.)
2023-11-11 08:49:19 -08:00

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