Is there an easy way to load and view the values in an activerecord object?

When I am debugging, an ActiveRecord find request returns an object which is not yet loaded from the DB.  Currently what I do is step further in the code until something causes the object to actually load its data, then open up @attributes.@attributes.@values from one of the object's @records.  What I would really like is to be able to have the object load its data right away and then see the values of the records without all the incessent clicking.  Does anyone out there have a good tool or technique for doing this?  I am using the most current RubyMine, if that matters.

 

Thanks!

0

Hi Olga, thanks I finally did try your suggestion - it does not seem to cause the records to load.  Maybe there's a way to do it that I didn't use but simply adding the object to a watch did not trigger activerecord the way that a reference in code does.

Thanks

Michael

0

Hello Michael,

sorry for the delay. To make things more clear would it be possible to provide a screencast showing your case?

0

请先登录再写评论。