blob: da8d8373fbc3c6e12b054d69d52f544ba5955e1d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# 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])
respond_to do |format|
format.html
format.js
end
end
def edit
end
private
def set_category
@category = Category.find_by(id: params[:id]) || Category.new
end
end
|