Class: ArticleCategoriesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/article_categories_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

current

Methods included from PathHelper

#finance_group_transactions_path

Instance Method Details

#collectionObject (protected)



22
23
24
# File 'app/controllers/article_categories_controller.rb', line 22

def collection
  @article_categories = ArticleCategory.order('name')
end

#createObject



6
7
8
# File 'app/controllers/article_categories_controller.rb', line 6

def create
  create!(notice: I18n.t('article_categories.create.notice')) { article_categories_path }
end

#destroyObject



14
15
16
17
18
# File 'app/controllers/article_categories_controller.rb', line 14

def destroy
  destroy!
rescue StandardError => e
  redirect_to article_categories_path, alert: I18n.t('article_categories.destroy.error', message: e.message)
end

#updateObject



10
11
12
# File 'app/controllers/article_categories_controller.rb', line 10

def update
  update!(notice: I18n.t('article_categories.update.notice')) { article_categories_path }
end