Sha256: 888a58a6907966be567c31359b7b8d4818c22a3bf1ac86dbfe1d4aa2208211d0

Contents?: true

Size: 295 Bytes

Versions: 8

Compression:

Stored size: 295 Bytes

Contents

# frozen_string_literal: true

module PUNK
  class GroupUserMetadata < PUNK::Model(:groups_users)
    many_to_one :group
    many_to_one :user

    def validate
      validates_presence :group
      validates_presence :user
    end

    def to_s
      "#{group_id}|#{user_id}"
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
punk-0.4.1 lib/punk/models/group_user_metadata.rb
punk-0.3.6 lib/punk/models/group_user_metadata.rb
punk-0.3.5 lib/punk/models/group_user_metadata.rb
punk-0.3.4 lib/punk/models/group_user_metadata.rb
punk-0.3.3 lib/punk/models/group_user_metadata.rb
punk-0.3.2 lib/punk/models/group_user_metadata.rb
punk-0.3.1 lib/punk/models/group_user_metadata.rb
punk-0.2.0 lib/punk/models/group_user_metadata.rb