I have this model
class DetailPurchase < ActiveRecord::Base
belongs_to :purchase, :foreign_key => 'purchase_id'
belongs_to :product, :foreign_key => 'product_id'
belongs_to :buy_order_detail, :foreign_key => 'buy_detail_id'
Storage.create!(:product_id => self.product_id, :current_quantity
=> self.quantity, :stg_data => purchase.prc_data)
as you can see I'm using "before_create" callback. It was working just
fine two weeks ago, but today I realize it wasn't. I don't know why.
The only change is that now I'm using jquery instead of prototype