The personal finance app for everyone
Fix: Omit layout for turbo frames with custom sidebar layout (#1024)
pranavbabu7ba9830db595
diff --git a/app/controllers/account/entries_controller.rb b/app/controllers/account/entries_controller.rbindex 22bbe34f..70c04e67 100644--- a/app/controllers/account/entries_controller.rb+++ b/app/controllers/account/entries_controller.rb@@ -1,5 +1,5 @@class Account::EntriesController < ApplicationController- layout "with_sidebar"+ layout :with_sidebarbefore_action :set_accountbefore_action :set_entry, only: %i[ edit update show destroy ]diff --git a/app/controllers/account/holdings_controller.rb b/app/controllers/account/holdings_controller.rbindex 136040ae..14e7e9ff 100644--- a/app/controllers/account/holdings_controller.rb+++ b/app/controllers/account/holdings_controller.rb@@ -1,5 +1,5 @@class Account::HoldingsController < ApplicationController- layout "with_sidebar"+ layout :with_sidebarbefore_action :set_accountbefore_action :set_holding, only: :showdiff --git a/app/controllers/account/transfers_controller.rb b/app/controllers/account/transfers_controller.rbindex ac60583a..4fbf4268 100644--- a/app/controllers/account/transfers_controller.rb+++ b/app/controllers/account/transfers_controller.rb@@ -1,5 +1,5 @@class Account::TransfersController < ApplicationController- layout "with_sidebar"+ layout :with_sidebarbefore_action :set_transfer, only: :destroydiff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rbindex 568f440f..a02e1c91 100644--- a/app/controllers/accounts_controller.rb+++ b/app/controllers/accounts_controller.rb@@ -1,5 +1,5 @@class AccountsController < ApplicationController- layout "with_sidebar"+ layout :with_sidebarinclude Filterablebefore_action :set_account, only: %i[ edit show destroy sync update ]diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rbindex b8d5a836..2a3427fb 100644--- a/app/controllers/application_controller.rb+++ b/app/controllers/application_controller.rb@@ -4,4 +4,12 @@ class ApplicationController < ActionController::Base# Only allow modern browsers supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has.allow_browser versions: :modern++ private++ def with_sidebar+ return "turbo_rails/frame" if turbo_frame_request?++ "with_sidebar"+ endenddiff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rbindex dfbe63e4..219a6973 100644--- a/app/controllers/categories_controller.rb+++ b/app/controllers/categories_controller.rb@@ -1,5 +1,5 @@class CategoriesController < ApplicationController- layout "with_sidebar"+ layout :with_sidebarbefore_action :set_category, only: %i[ edit update ]before_action :set_transaction, only: :creatediff --git a/app/controllers/category/deletions_controller.rb b/app/controllers/category/deletions_controller.rbindex 96ff4c47..57f8ee5f 100644--- a/app/controllers/category/deletions_controller.rb+++ b/app/controllers/category/deletions_controller.rb@@ -1,5 +1,5 @@class Category::DeletionsController < ApplicationController- layout "with_sidebar"+ layout :with_sidebarbefore_action :set_categorybefore_action :set_replacement_category, only: :creatediff --git a/app/controllers/help/articles_controller.rb b/app/controllers/help/articles_controller.rbindex 17ff8fae..e5b19ff3 100644--- a/app/controllers/help/articles_controller.rb+++ b/app/controllers/help/articles_controller.rb@@ -1,5 +1,5 @@class Help::ArticlesController < ApplicationController- layout "with_sidebar"+ layout :with_sidebardef show@article = Help::Article.find(params[:id])diff --git a/app/controllers/merchants_controller.rb b/app/controllers/merchants_controller.rbindex 17c1343f..055f3da8 100644--- a/app/controllers/merchants_controller.rb+++ b/app/controllers/merchants_controller.rb@@ -1,5 +1,5 @@class MerchantsController < ApplicationController- layout "with_sidebar"+ layout :with_sidebarbefore_action :set_merchant, only: %i[ edit update destroy ]diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rbindex 92904be5..30f07532 100644--- a/app/controllers/pages_controller.rb+++ b/app/controllers/pages_controller.rb@@ -1,5 +1,5 @@class PagesController < ApplicationController- layout "with_sidebar"+ layout :with_sidebarinclude Filterablediff --git a/app/controllers/settings_controller.rb b/app/controllers/settings_controller.rbindex f908b939..e0fcac5e 100644--- a/app/controllers/settings_controller.rb+++ b/app/controllers/settings_controller.rb@@ -1,3 +1,3 @@class SettingsController < ApplicationController- layout "with_sidebar"+ layout :with_sidebarenddiff --git a/app/controllers/tag/deletions_controller.rb b/app/controllers/tag/deletions_controller.rbindex 19183c57..a5b14f7c 100644--- a/app/controllers/tag/deletions_controller.rb+++ b/app/controllers/tag/deletions_controller.rb@@ -1,5 +1,5 @@class Tag::DeletionsController < ApplicationController- layout "with_sidebar"+ layout :with_sidebarbefore_action :set_tagbefore_action :set_replacement_tag, only: :creatediff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rbindex 9a3ccebf..64b4a6e7 100644--- a/app/controllers/tags_controller.rb+++ b/app/controllers/tags_controller.rb@@ -1,5 +1,5 @@class TagsController < ApplicationController- layout "with_sidebar"+ layout :with_sidebarbefore_action :set_tag, only: %i[ edit update ]diff --git a/app/controllers/transactions_controller.rb b/app/controllers/transactions_controller.rbindex 482ed9db..55bb8100 100644--- a/app/controllers/transactions_controller.rb+++ b/app/controllers/transactions_controller.rb@@ -1,5 +1,5 @@class TransactionsController < ApplicationController- layout "with_sidebar"+ layout :with_sidebardef index@q = search_params