Archive: ComponentOwl Rails app, DB backups, go redirect script
This commit is contained in:
17
app/models/bmt_product.rb
Normal file
17
app/models/bmt_product.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
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
|
||||
Reference in New Issue
Block a user