Join the DZone community and get the full member experience.Join For Free
// description of your code here
class ProductOption << ActiveRecord::Base set_table_name 'OPTIONS_PRODUCTS' def self.set_price(product, option, price) x = self.find(:first, :conditions = ['product_id = ? and option_id = ?', product.id, option.id]) x.price = price x.save end end
Opinions expressed by DZone contributors are their own.