1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-20 21:59:38 +02:00
Maybe/app/helpers/application_helper.rb

21 lines
534 B
Ruby
Raw Normal View History

2024-02-02 09:05:04 -06:00
module ApplicationHelper
def title(page_title)
content_for(:title) { page_title }
end
def header_title(page_title)
content_for(:header_title) { page_title }
end
2024-02-02 23:41:58 +00:00
def permitted_accountable_partial(name)
name.underscore
end
# Wrap view with <%= modal do %> ... <% end %> to have it open in a modal
# Make sure to add data-turbo-frame="modal" to the link/button that opens the modal
def modal(&block)
content = capture &block
render partial: "shared/modal", locals: { content: content }
end
2024-02-02 09:05:04 -06:00
end