diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb index b29fd594..c9dd1362 100644 --- a/app/controllers/articles_controller.rb +++ b/app/controllers/articles_controller.rb @@ -7,12 +7,12 @@ class ArticlesController < ApplicationController sort = case params['sort'] when "name" then "articles.name" when "unit" then "articles.unit" - when "category" then "article_categories.name" + when "article_category" then "article_categories.name" when "note" then "articles.note" when "availability" then "articles.availability" when "name_reverse" then "articles.name DESC" when "unit_reverse" then "articles.unit DESC" - when "category_reverse" then "article_categories.name DESC" + when "article_category_reverse" then "article_categories.name DESC" when "note_reverse" then "articles.note DESC" when "availability_reverse" then "articles.availability DESC" end diff --git a/app/views/articles/_articles.html.haml b/app/views/articles/_articles.html.haml index e8a1c7b1..283abc53 100644 --- a/app/views/articles/_articles.html.haml +++ b/app/views/articles/_articles.html.haml @@ -8,7 +8,7 @@ %th %th= sort_link_helper heading_helper(Article, :name), "name" %th - %th= sort_link_helper heading_helper(Article, :category), "category" + %th= sort_link_helper heading_helper(Article, :article_category), "article_category" %th= sort_link_helper heading_helper(Article, :unit), "unit" %th= sort_link_helper heading_helper(Article, :note), "note" %th{:style => "width: 4em;"}= heading_helper Article, :unit_quantity, short: true