From d95947f9d738fd74d1fc16c6a1843b7f46bc0484 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sun, 5 Jul 2026 21:52:56 +0200 Subject: Whitespace fixes --- app/controllers/admin_controller.rb | 4 ++-- app/controllers/nodes_controller.rb | 28 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'app') diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index e0098b0..bfc6cd8 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -1,7 +1,7 @@ class AdminController < ApplicationController - + # Private - + before_action :login_required def index diff --git a/app/controllers/nodes_controller.rb b/app/controllers/nodes_controller.rb index 1e1def2..380a659 100644 --- a/app/controllers/nodes_controller.rb +++ b/app/controllers/nodes_controller.rb @@ -1,14 +1,14 @@ class NodesController < ApplicationController - + # Private - + layout 'admin' - + before_action :login_required before_action :find_node, :only => [ - :show, - :edit, - :update, + :show, + :edit, + :update, :destroy, :publish, :unlock @@ -27,10 +27,10 @@ class NodesController < ApplicationController @parent_name = Node.find(@parent_id).title end end - + def create params[:title] ||= "" - + @node = Node.new @node.parent_id = find_parent @node.slug = slug_for(params[:title]) @@ -49,7 +49,7 @@ class NodesController < ApplicationController render :new end end - + def show node = Node.find(params[:id]) node.wipe_draft! @@ -87,20 +87,20 @@ class NodesController < ApplicationController def destroy @node.destroy end - + def publish @node.publish_draft! flash[:notice] = "Draft has been published" redirect_to node_path(@node) end - + def unlock if @node.unlock! flash[:notice] = "Node unlocked" else flash[:notice] = "Already unlocked" end - + redirect_to node_path(@node) end @@ -121,11 +121,11 @@ class NodesController < ApplicationController def page_params params.fetch(:page, {}).permit(:title, :abstract, :body, :template_name, :published_at, :user_id) end - + def find_node @node = Node.find(params[:id]) end - + def find_parent case params[:kind] when "generic" -- cgit v1.3