Add some toasts
This commit is contained in:
parent
84fc1d2d93
commit
934deddec4
10 changed files with 50 additions and 5 deletions
|
|
@ -28,4 +28,8 @@ module ApplicationHelper
|
|||
def current_page_displayed(page)
|
||||
@current_page&.id == page.id ? "open" : nil
|
||||
end
|
||||
|
||||
def turbo_stream_toast(content, alert)
|
||||
turbo_stream.append("toasts", partial: "layouts/toast", locals: { content:, alert: })
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue