On 17 August 2011 15:31, Angelo Cordova <acord...@gmail.com> wrote:
>
>> Debugging will tell you whether the callback is being called.  If you
>> assign the result of Storage.create! to a variable and break after
>> that then you will be able to inspect that object.
>>
> I tried this
>
>  def before_create
>     debugger
>    stg = Storage.create!(:product_id =>
> self.product_id, :current_quantity
>  => self.quantity, :stg_data => purchase.prc_data)
> end
>
> and when I "inspect" the variable "stg" I got  "stg => nil" as result

That is not surprising since you have broken *before* the line that
allocates stg.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to