class Inventory::InventoryController < BaseInventoryController load_and_authorize_resource def index filter = params[:filter] @inventory_definitions = InventoryDefinition.get_by_category(filter) end def show inventory_definition_id = params[:inventory_definition_id] inventory = InventoryDefinition.find_by_id(inventory_definition_id) @stock_journals = StockJournal.where("item_code=?",inventory.item_code).order("id DESC") @stock_journals = Kaminari.paginate_array(@stock_journals).page(params[:page]).per(20) respond_to do |format| format.html format.xls end end end