Sha256: 1ca3f841fc931771f605e3ecc0b76c4362f9b019e441e0bad41fd7574812ff42

Contents?: true

Size: 573 Bytes

Versions: 42

Compression:

Stored size: 573 Bytes

Contents

module Locomotive
  module API
    module Entities

      class MembershipEntity < BaseEntity

        expose :role

        # render the BSON id
        expose :account_id do |membership, _|
          membership.account_id.to_s
        end

        expose :name do |membership, _|
          membership.account.name
        end

        expose :role_name do |membership, _|
          I18n.t("locomotive.memberships.roles.#{membership.role}")
        end

        expose :email do |membership, _|
          membership.account.email
        end

      end

    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
locomotivecms-3.3.0.rc1 app/api/locomotive/api/entities/membership_entity.rb
locomotivecms-3.2.0 app/api/locomotive/api/entities/membership_entity.rb
locomotivecms-3.2.0.rc2 app/api/locomotive/api/entities/membership_entity.rb
locomotivecms-3.2.0.rc1 app/api/locomotive/api/entities/membership_entity.rb
locomotivecms-3.1.1 app/api/locomotive/api/entities/membership_entity.rb
locomotivecms-3.1.0 app/api/locomotive/api/entities/membership_entity.rb
locomotivecms-3.1.0.rc3 app/api/locomotive/api/entities/membership_entity.rb
locomotivecms-3.1.0.rc2 app/api/locomotive/api/entities/membership_entity.rb
locomotivecms-3.1.0.rc1 app/api/locomotive/api/entities/membership_entity.rb
locomotivecms-3.0.1 app/api/locomotive/api/entities/membership_entity.rb
locomotivecms-3.0.0 app/api/locomotive/api/entities/membership_entity.rb
locomotivecms-3.0.0.rc7 app/api/locomotive/api/entities/membership_entity.rb
locomotivecms-3.0.0.rc6 app/api/locomotive/api/entities/membership_entity.rb
locomotivecms-3.0.0.rc5 app/api/locomotive/api/entities/membership_entity.rb
locomotivecms-3.0.0.rc4 app/api/locomotive/api/entities/membership_entity.rb
locomotivecms-3.0.0.rc3 app/api/locomotive/api/entities/membership_entity.rb
locomotivecms-3.0.0.rc2 app/api/locomotive/api/entities/membership_entity.rb
locomotivecms-3.0.0.rc1 app/api/locomotive/api/entities/membership_entity.rb
locomotivecms-3.0.0.pre.beta.1 app/api/locomotive/api/entities/membership_entity.rb
locomotivecms-3.0.0.pre.alpha.3 app/api/locomotive/api/entities/membership_entity.rb