mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-23 15:19:38 +02:00
Fix: Omit layout for turbo frames with custom sidebar layout (#1024)
* Define layout method * Use with_sidebar method --------- Co-authored-by: Pranav Babu <babu@maindeck.io>
This commit is contained in:
parent
dfc7e1c30c
commit
7ba9830db5
14 changed files with 21 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
||||||
class Account::EntriesController < ApplicationController
|
class Account::EntriesController < ApplicationController
|
||||||
layout "with_sidebar"
|
layout :with_sidebar
|
||||||
|
|
||||||
before_action :set_account
|
before_action :set_account
|
||||||
before_action :set_entry, only: %i[ edit update show destroy ]
|
before_action :set_entry, only: %i[ edit update show destroy ]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class Account::HoldingsController < ApplicationController
|
class Account::HoldingsController < ApplicationController
|
||||||
layout "with_sidebar"
|
layout :with_sidebar
|
||||||
|
|
||||||
before_action :set_account
|
before_action :set_account
|
||||||
before_action :set_holding, only: :show
|
before_action :set_holding, only: :show
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class Account::TransfersController < ApplicationController
|
class Account::TransfersController < ApplicationController
|
||||||
layout "with_sidebar"
|
layout :with_sidebar
|
||||||
|
|
||||||
before_action :set_transfer, only: :destroy
|
before_action :set_transfer, only: :destroy
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class AccountsController < ApplicationController
|
class AccountsController < ApplicationController
|
||||||
layout "with_sidebar"
|
layout :with_sidebar
|
||||||
|
|
||||||
include Filterable
|
include Filterable
|
||||||
before_action :set_account, only: %i[ edit show destroy sync update ]
|
before_action :set_account, only: %i[ edit show destroy sync update ]
|
||||||
|
|
|
@ -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.
|
# Only allow modern browsers supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has.
|
||||||
allow_browser versions: :modern
|
allow_browser versions: :modern
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def with_sidebar
|
||||||
|
return "turbo_rails/frame" if turbo_frame_request?
|
||||||
|
|
||||||
|
"with_sidebar"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class CategoriesController < ApplicationController
|
class CategoriesController < ApplicationController
|
||||||
layout "with_sidebar"
|
layout :with_sidebar
|
||||||
|
|
||||||
before_action :set_category, only: %i[ edit update ]
|
before_action :set_category, only: %i[ edit update ]
|
||||||
before_action :set_transaction, only: :create
|
before_action :set_transaction, only: :create
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class Category::DeletionsController < ApplicationController
|
class Category::DeletionsController < ApplicationController
|
||||||
layout "with_sidebar"
|
layout :with_sidebar
|
||||||
|
|
||||||
before_action :set_category
|
before_action :set_category
|
||||||
before_action :set_replacement_category, only: :create
|
before_action :set_replacement_category, only: :create
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class Help::ArticlesController < ApplicationController
|
class Help::ArticlesController < ApplicationController
|
||||||
layout "with_sidebar"
|
layout :with_sidebar
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@article = Help::Article.find(params[:id])
|
@article = Help::Article.find(params[:id])
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class MerchantsController < ApplicationController
|
class MerchantsController < ApplicationController
|
||||||
layout "with_sidebar"
|
layout :with_sidebar
|
||||||
|
|
||||||
before_action :set_merchant, only: %i[ edit update destroy ]
|
before_action :set_merchant, only: %i[ edit update destroy ]
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class PagesController < ApplicationController
|
class PagesController < ApplicationController
|
||||||
layout "with_sidebar"
|
layout :with_sidebar
|
||||||
|
|
||||||
include Filterable
|
include Filterable
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
class SettingsController < ApplicationController
|
class SettingsController < ApplicationController
|
||||||
layout "with_sidebar"
|
layout :with_sidebar
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class Tag::DeletionsController < ApplicationController
|
class Tag::DeletionsController < ApplicationController
|
||||||
layout "with_sidebar"
|
layout :with_sidebar
|
||||||
|
|
||||||
before_action :set_tag
|
before_action :set_tag
|
||||||
before_action :set_replacement_tag, only: :create
|
before_action :set_replacement_tag, only: :create
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class TagsController < ApplicationController
|
class TagsController < ApplicationController
|
||||||
layout "with_sidebar"
|
layout :with_sidebar
|
||||||
|
|
||||||
before_action :set_tag, only: %i[ edit update ]
|
before_action :set_tag, only: %i[ edit update ]
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class TransactionsController < ApplicationController
|
class TransactionsController < ApplicationController
|
||||||
layout "with_sidebar"
|
layout :with_sidebar
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@q = search_params
|
@q = search_params
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue