1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-20 13:49:39 +02:00
Maybe/app/controllers/application_controller.rb
pranavbabu 7ba9830db5
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>
2024-07-26 12:00:41 -04:00

15 lines
409 B
Ruby

class ApplicationController < ActionController::Base
include AutoSync, Authentication, Invitable, SelfHostable
include Pagy::Backend
# 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"
end
end