diff --git a/app/controllers/items_controller.rb b/app/controllers/items_controller.rb index 3b0b064..c40882f 100644 --- a/app/controllers/items_controller.rb +++ b/app/controllers/items_controller.rb @@ -12,6 +12,7 @@ class ItemsController < ApplicationController before_action :require_login before_action :find_item, only: [:show, :edit, :update, :destroy] + # Used for autocomplete form def autocomplete term = ActiveRecord::Base.sanitize_sql_like(params[:q].to_s) @@ -60,7 +61,7 @@ class ItemsController < ApplicationController render_404 end - def index + def index @items = Item.order(:name) end