WIP Rename "projects" page, make content editable
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2025-05-28 18:42:10 +04:00
parent 315cf4dd9f
commit 6713665a61
6 changed files with 70 additions and 61 deletions

View File

@@ -0,0 +1,22 @@
class Contributions::OtherController < ApplicationController
before_action :authenticate_user!
before_action :set_content_editing
# GET /contributions/other
def index
@content_title = EditableContent.find_or_create_by(
path: "contributions/other", key: "title"
)
@content_body = EditableContent.find_or_create_by(
path: "contributions/other", key: "body", rich_text: true
)
@current_section = :contributions
end
private
def set_content_editing
return unless params[:edit] && current_user.is_admin?
@edit_content = true
end
end

View File

@@ -1,8 +0,0 @@
class Contributions::ProjectsController < ApplicationController
before_action :authenticate_user!
# GET /contributions
def index
@current_section = :contributions
end
end