Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Variation of #1773 of Master - Adding Memoization, Eager Load to impr…

…ove Zone performance
  • Loading branch information...
commit afecc71e381e5518b8e8616a292b1c964b32120e 1 parent d090b83
@GeekOnCoffee GeekOnCoffee authored BDQ committed
View
2  core/app/models/spree/address.rb
@@ -44,7 +44,7 @@ def zone
end
def zones
- Zone.match(self)
+ @zones ||= Zone.match(self)
end
def same_as?(other)
View
1  core/app/models/spree/zone.rb
@@ -53,6 +53,7 @@ def self.match(address)
# convenience method for returning the countries contained within a zone
def country_list
+ @countries ||=
case kind
when 'country'
zoneables
Please sign in to comment.
Something went wrong with that request. Please try again.