diff --git a/app/controllers/admin/partners_controller.rb b/app/controllers/admin/partners_controller.rb index edcd0ad3c0..4353ce4151 100644 --- a/app/controllers/admin/partners_controller.rb +++ b/app/controllers/admin/partners_controller.rb @@ -1,6 +1,6 @@ class Admin::PartnersController < AdminController def index - @partners = Partner.all.includes(:organization) + @partners = Partner.all.includes(:organization).order('LOWER(name)') end def show diff --git a/app/controllers/items_controller.rb b/app/controllers/items_controller.rb index cd066bac84..d48fbf88e7 100644 --- a/app/controllers/items_controller.rb +++ b/app/controllers/items_controller.rb @@ -50,7 +50,8 @@ def create @base_items = BaseItem.without_kit.alphabetized # Define a @item to be used in the `new` action to be rendered with # the provided parameters. This is required to render the page again - # with the error + the invalid parameters + # with the error + the invalid parameters. + @item_categories = current_organization.item_categories.order('name ASC') # Load categories here @item = current_organization.items.new(item_params) flash[:error] = result.error.record.errors.full_messages.to_sentence render action: :new