diff options
author | hellekin <hellekin@cepheide.org> | 2020-11-12 01:10:28 +0100 |
---|---|---|
committer | hellekin <hellekin@cepheide.org> | 2020-11-12 01:10:28 +0100 |
commit | 8d9387cf64929b6467b6ba52f22ca0aa5ed35782 (patch) | |
tree | 37533e75476680ebad4cd1d47e3e578b879726ba /app/controllers/categories_controller.rb | |
parent | b6aeac4d9274f17e748efb3715aa08f4b7c361f2 (diff) | |
parent | 757decefafb5d82557a8b7fa9691f94f19c3207e (diff) | |
download | incommon-map-8d9387cf64929b6467b6ba52f22ca0aa5ed35782.tar.gz |
Merged master
Diffstat (limited to 'app/controllers/categories_controller.rb')
-rw-r--r-- | app/controllers/categories_controller.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb new file mode 100644 index 0000000..40f1ff5 --- /dev/null +++ b/app/controllers/categories_controller.rb @@ -0,0 +1,23 @@ +# SPDX-FileCopyrightText: 2020 IN COMMON Collective <collective@incommon.cc> +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +class CategoriesController < ApplicationController + before_action :set_category, only: [:new, :show, :edit, :update, :delete, :destroy] + + def index + end + + def show + @category = Category.find(params[:id]) + end + + def edit + end + + private + + def set_category + @category = Category.find_by(id: params[:id]) || Category.new + end +end |