module Yao::Resources::ProjectAssociationable

Public Class Methods

included(base) click to toggle source
# File lib/yao/resources/project_associationable.rb, line 5
def self.included(base)
  base.friendly_attributes :project_id
  base.friendly_attributes :tenant_id
end

Public Instance Methods

project() click to toggle source

@return [Yao::Resources::Project]

# File lib/yao/resources/project_associationable.rb, line 11
def project
  @project ||= Yao::Project.find(project_id || tenant_id)
end
Also aliased as: tenant
tenant()
Alias for: project