mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-11 18:26:50 +00:00
23 lines
433 B
Ruby
23 lines
433 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Admin
|
|
class ProductPreviewController < Spree::Admin::BaseController
|
|
def show
|
|
@product = Spree::Product.find(params[:id])
|
|
authorize! :show, @product
|
|
|
|
respond_with do |format|
|
|
format.turbo_stream {
|
|
render "admin/products_v3/product_preview", status: :ok
|
|
}
|
|
end
|
|
end
|
|
|
|
private
|
|
|
|
def model_class
|
|
Spree::Product
|
|
end
|
|
end
|
|
end
|