Thursday, June 04, 2026 5:16:49 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
> turbo_helper.rb
# frozen_string_literal: true

module TurboHelper
  def turbo_frame(id, **args, &block)
    turbo_frame_tag("#{id}_frame", **args, &block)
  end

  alias_method :update_turbo_frame, :turbo_frame

  def update_turbo_modal(id, &block)
    turbo_frame_tag("#{id}_frame") do
      yield

      concat content_tag(:div, nil, data: {trigger: "modal:show:##{id}"})
    end
  end

  def show_modal(selector)
    turbo_stream.append("main-container") do
      content_tag(:div, nil, data: {trigger: "modal:show:#{selector}"})
    end
  end

  def hide_modal(selector)
    turbo_stream.append("main-container") do
      content_tag(:div, nil, data: {trigger: "modal:hide:#{selector}"})
    end
  end
end
All opinions represented herein are my own
- © 2024 - 2026 itsthedevman
- build 4294fb2