Skip to content

Instantly share code, notes, and snippets.

@fivetwentysix
Created April 5, 2011 12:36
Show Gist options
  • Select an option

  • Save fivetwentysix/903513 to your computer and use it in GitHub Desktop.

Select an option

Save fivetwentysix/903513 to your computer and use it in GitHub Desktop.
def size_39_quantity
if self.variants.find_by_size(39)
self.variants.count_on_hand
else
0
end
end
def size_40_quantity
if self.variants.find_by_size(40)
self.variants.count_on_hand
else
0
end
end
def size_41_quantity
if self.variants.find_by_size(41)
self.variants.count_on_hand
else
0
end
end
def size_42_quantity
if self.variants.find_by_size(42)
self.variants.count_on_hand
else
0
end
end
def size_43_quantity
if self.variants.find_by_size(43)
self.variants.count_on_hand
else
0
end
end
def size_44_quantity
if self.variants.find_by_size(44)
self.variants.count_on_hand
else
0
end
end
def size_45_quantity
if self.variants.find_by_size(45)
self.variants.count_on_hand
else
0
end
end
def size_46_quantity
if self.variants.find_by_size(46)
self.variants.count_on_hand
else
0
end
end
def size_47_quantity
if self.variants.find_by_size(47)
self.variants.count_on_hand
else
0
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment