Wednesday, July 15, 2026 2:47:42 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
> communities_helper.rb
# frozen_string_literal: true

module CommunitiesHelper
  def options_for_communities
    communities = [OpenStruct.new(label: "", value: communities_path)]

    communities +=
      @communities.map do |community|
        OpenStruct.new(label: "[#{community.community_id}] #{community.community_name}", value: edit_community_path(community.public_id))
      end

    # Since the value is the route, we have to rebuild that to select it
    selected_community = edit_community_path(@community.public_id) if @community.present?
    options_from_collection_for_select(communities, :value, :label, selected_community)
  end
end
All opinions represented herein are my own
- © 2024 - 2026 itsthedevman
- build 43aa0d7