On 5 August 2014 05:30, Jaimin Pandya <li...@ruby-forum.com> wrote: >> As was suggested before, use logging to see what is actually happening. >> When you're starting without a clue, log after every line to see where >> things become different than what you expect. > > I used logging to see what is actually happening. I found > expensescounter_id comes nil which is not my requirement.
You have not shown us the code where you set expensescounter_id, or the code that you expect that value to be set. You have shown us the code where expenses_counter.id would be setup but presumably expensescounter_id is an attribute of a different object. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLuExFg8z3r9v_9TVdbYQbXXNDL2KpRiY%2B9HEEQnbqeNFA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.