From 635dbb90cbe03f6731244242b82795f67ba11196 Mon Sep 17 00:00:00 2001 From: "Stanko K.R." Date: Thu, 29 Jan 2026 15:38:11 +0100 Subject: [PATCH] Rename the Import controller to Account::Import --- app/controllers/{ => account}/imports_controller.rb | 4 ++-- app/views/{ => account}/imports/new.html.erb | 2 +- app/views/{ => account}/imports/show.html.erb | 2 +- app/views/sessions/menus/show.html.erb | 2 +- config/routes.rb | 3 +-- 5 files changed, 6 insertions(+), 7 deletions(-) rename app/controllers/{ => account}/imports_controller.rb (84%) rename app/views/{ => account}/imports/new.html.erb (87%) rename app/views/{ => account}/imports/show.html.erb (90%) diff --git a/app/controllers/imports_controller.rb b/app/controllers/account/imports_controller.rb similarity index 84% rename from app/controllers/imports_controller.rb rename to app/controllers/account/imports_controller.rb index b34845b84..05d9f957c 100644 --- a/app/controllers/imports_controller.rb +++ b/app/controllers/account/imports_controller.rb @@ -1,4 +1,4 @@ -class ImportsController < ApplicationController +class Account::ImportsController < ApplicationController layout "public" disallow_account_scope only: %i[ new create ] @@ -33,6 +33,6 @@ class ImportsController < ApplicationController import.process_later end - redirect_to import_path(import, script_name: account.slug) + redirect_to account_import_path(import, script_name: account.slug) end end diff --git a/app/views/imports/new.html.erb b/app/views/account/imports/new.html.erb similarity index 87% rename from app/views/imports/new.html.erb rename to app/views/account/imports/new.html.erb index 886a0b48f..bd75bbb3b 100644 --- a/app/views/imports/new.html.erb +++ b/app/views/account/imports/new.html.erb @@ -8,7 +8,7 @@
Create an account using data from a Fizzy export. Upload the exported .zip file below.
- <%= form_with url: imports_path, class: "flex flex-column gap", data: { controller: "form upload-preview" }, multipart: true do |form| %> + <%= form_with url: account_imports_path, class: "flex flex-column gap", data: { controller: "form upload-preview" }, multipart: true do |form| %>