edit category
CI / scan_ruby (push) Failing after 37s
CI / scan_js (push) Failing after 7s
CI / lint (push) Failing after 42s
CI / test (push) Failing after 7s
CI / system-test (push) Failing after 18s

This commit is contained in:
2026-01-23 22:10:51 +01:00
parent 9a814f1aa1
commit a79b27020a
3 changed files with 87 additions and 1 deletions
+16 -1
View File
@@ -1,5 +1,5 @@
class EntriesController < ApplicationController
before_action :set_entry, only: [ :show ]
before_action :set_entry, only: [ :show, :edit, :update ]
def index
@language_code = params[:language].presence
@@ -49,6 +49,17 @@ class EntriesController < ApplicationController
def show
end
def edit
end
def update
if @entry.update(entry_params)
redirect_to entry_path(@entry), notice: "Entry updated."
else
render :edit, status: :unprocessable_entity
end
end
def download
@entries = Entry.order(:id)
respond_to do |format|
@@ -64,4 +75,8 @@ class EntriesController < ApplicationController
def set_entry
@entry = Entry.find(params[:id])
end
def entry_params
params.require(:entry).permit(:category)
end
end