Class: HasHelpers::User

Inherits:
ApplicationRecord show all
Defined in:
app/models/has_helpers/user.rb

Instance Method Summary collapse

Instance Method Details

#organizationObject



10
11
12
# File 'app/models/has_helpers/user.rb', line 10

def organization
  user_organizations.find { |uo| uo.is_primary == true }&.organization
end

#organization_idObject



14
15
16
# File 'app/models/has_helpers/user.rb', line 14

def organization_id
  user_organizations.find { |uo| uo.is_primary == true }&.organization_id
end