Thursday, June 04, 2026 2:30:07 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
> user_alias.rb
# frozen_string_literal: true

module ESM
  class UserAlias < ApplicationRecord
    # =============================================================================
    # INITIALIZE
    # =============================================================================

    # =============================================================================
    # DATA STRUCTURE
    # =============================================================================

    public_attributes(
      :value,
      id: ->(user_alias) { user_alias.public_id },
      type: ->(user_alias) { user_alias.server_id ? :server : :community },
      community: ->(user_alias) { user_alias.community&.public_attributes },
      server: ->(user_alias) { user_alias.server&.public_attributes }
    )

    # =============================================================================
    # ASSOCIATIONS
    # =============================================================================

    # =============================================================================
    # VALIDATIONS
    # =============================================================================

    # =============================================================================
    # CALLBACKS
    # =============================================================================

    # =============================================================================
    # SCOPES
    # =============================================================================

    # =============================================================================
    # CLASS METHODS
    # =============================================================================

    # =============================================================================
    # INSTANCE METHODS
    # =============================================================================
  end
end
All opinions represented herein are my own
- © 2024 - 2026 itsthedevman
- build 4294fb2