Small fixes for article_categories.
This commit is contained in:
parent
0236fb5a60
commit
181695d1bd
2 changed files with 20 additions and 12 deletions
|
@ -12,4 +12,10 @@ class ArticleCategoriesController < ApplicationController
|
||||||
update!(:notice => "Die Kategorie wurde aktualisiert") { article_categories_path }
|
update!(:notice => "Die Kategorie wurde aktualisiert") { article_categories_path }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
protected
|
||||||
|
|
||||||
|
def collection
|
||||||
|
@article_categories = ArticleCategory.order('name')
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,12 +3,14 @@
|
||||||
%p= link_to "Neue Kategorie anlegen", new_article_category_path, class: 'btn btn-primary'
|
%p= link_to "Neue Kategorie anlegen", new_article_category_path, class: 'btn btn-primary'
|
||||||
|
|
||||||
%table.table.table-striped
|
%table.table.table-striped
|
||||||
|
%thead
|
||||||
%tr
|
%tr
|
||||||
%th Name
|
%th Name
|
||||||
%th Beschreibung
|
%th Beschreibung
|
||||||
%th
|
%th
|
||||||
- for article_category in ArticleCategory.all
|
%tbody
|
||||||
%tr{:class => cycle("even","odd", :name => 'category')}[article_category]
|
- @article_categories.each do |article_category|
|
||||||
|
%tr
|
||||||
%td= article_category.name
|
%td= article_category.name
|
||||||
%td= article_category.description
|
%td= article_category.description
|
||||||
%td
|
%td
|
||||||
|
|
Loading…
Reference in a new issue