aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/categories_controller.rb
blob: 40f1ff58bcc7ece2e66fd1704bcd99adeb2e38d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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