diff --git a/app/controllers/barcodes_controller.rb b/app/controllers/barcodes_controller.rb index 3f61f50..549c278 100644 --- a/app/controllers/barcodes_controller.rb +++ b/app/controllers/barcodes_controller.rb @@ -20,6 +20,10 @@ class BarcodesController < ApplicationController def index @barcodes = Barcode.all.order(:code) + respond_to do |format| + format.json {render json: @barcodes} + format.html {} + end end def show