Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Untitled

DZone's Guide to

Untitled

·
Free Resource
// 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:

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}