Skip to content

Commit

Permalink
memoize root tenant
Browse files Browse the repository at this point in the history
  • Loading branch information
lpichler committed May 26, 2017
1 parent 74d6415 commit 937efa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/tenant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def self.default_tenant
#
# @return [Tenant] the root tenant
def self.root_tenant
in_my_region.roots.first
@root_tenant ||= in_my_region.roots.first
end

# NOTE: returns the root tenant
Expand Down

0 comments on commit 937efa8

Please sign in to comment.