17 lines
447 B
Ruby
17 lines
447 B
Ruby
class BmtProduct
|
|
|
|
def self.find(bmtID)
|
|
product_edition = ProductEdition.find_by_bmtID(bmtID)
|
|
return product_edition if product_edition
|
|
|
|
product = Product.find_by_bmtID(bmtID)
|
|
return product if product
|
|
|
|
product_offer = ProductOffer.find_by_bmtID(bmtID)
|
|
return product_offer if product_offer
|
|
|
|
product_upgrade = ProductUpgrade.find_by_bmtID(bmtID)
|
|
return product_upgrade if product_upgrade
|
|
end
|
|
|
|
end |