Class: InventoriesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/inventories_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject

GET /inventories GET /inventories.json



7
8
9
10
11
12
13
14
# File 'app/controllers/inventories_controller.rb', line 7

def index
  @inventories = Inventory.page(params[:page])

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

#showObject

GET /inventories/1 GET /inventories/1.json



18
19
20
21
22
23
# File 'app/controllers/inventories_controller.rb', line 18

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