Thursday, June 04, 2026 5:15:31 AM
> project show esm_website_v1
The unexpected heart of the ESM ecosystem. What started as a simple Rails dashboard has evolved into the command center for thousands of gaming communities, proving that sometimes the best infrastructure projects are the ones you never planned to build.
Details
> toast_helper.rb
# frozen_string_literal: true

module ToastHelper
  def create_toast(body, title: "", subtitle: "", color: nil)
    turbo_stream.append("toast-container") do
      concat(
        render_component(
          ToastComponent,
          title:, subtitle:, body:, color:
        )
      )
    end
  end

  def create_info_toast(*, title: "Info", **)
    create_toast(*, title:, **)
  end

  def create_success_toast(*, title: "Success", **)
    create_toast(*, title:, **)
  end

  def create_warn_toast(*, title: "Warn", **)
    create_toast(*, title:, **)
  end

  def create_error_toast(*, title: "Error", **)
    create_toast(*, title:, **)
  end
end
All opinions represented herein are my own
- © 2024 - 2026 itsthedevman
- build 4294fb2