foodsoft/app/controllers/article_categories_controller.rb

22 lines
474 B
Ruby
Raw Normal View History

class ArticleCategoriesController < ApplicationController
2011-05-18 16:10:30 +02:00
inherit_resources # Build default REST Actions via plugin
2011-05-18 16:10:30 +02:00
before_filter :authenticate_article_meta
def create
2011-05-18 16:10:30 +02:00
create!(:notice => "Die Kategorie wurde gespeichert") { article_categories_path }
end
def update
2011-05-18 16:10:30 +02:00
update!(:notice => "Die Kategorie wurde aktualisiert") { article_categories_path }
end
2012-11-10 16:51:30 +01:00
protected
def collection
@article_categories = ArticleCategory.order('name')
end
end