Over a million developers have joined DZone.

Untitled

·
// 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
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}