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
|
2024-02-08 10:46:05 -06:00
|
|
|
|
|
|
|
# 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)
|
2024-02-09 14:25:59 +00:00
|
|
|
content = capture &block
|
|
|
|
render partial: "shared/modal", locals: { content: content }
|
2024-02-08 10:46:05 -06:00
|
|
|
end
|
2024-02-02 09:05:04 -06:00
|
|
|
end
|