Sha256: a5a8a19f24da05441330d517af7332f2633f110e4c3cdab16ea6a5a08f9e31cc

Contents?: true

Size: 625 Bytes

Versions: 5

Compression:

Stored size: 625 Bytes

Contents

class InventoriesController < ApplicationController
  load_and_authorize_resource
  # GET /inventories
  # GET /inventories.json
  def index
    @inventories = Inventory.page(params[:page])

    respond_to do |format|
      format.html # index.html.erb
      format.json { render json: @inventories }
    end
  end

  # GET /inventories/1
  # GET /inventories/1.json
  def show
    respond_to do |format|
      format.html # show.html.erb
      format.json { render json: @inventory }
    end
  end

  private
  def inventory_params
    params.require(:inventory).permit(
      :item_id, :inventory_id, :note
    )
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
enju_inventory-0.1.12 app/controllers/inventories_controller.rb
enju_inventory-0.1.11 app/controllers/inventories_controller.rb
enju_inventory-0.1.11.pre13 app/controllers/inventories_controller.rb
enju_inventory-0.1.11.pre12 app/controllers/inventories_controller.rb
enju_inventory-0.1.11.pre11 app/controllers/inventories_controller.rb