[Rails] How to pass arguments to functions in callbacks in model ?

2009-05-24 Thread Arpit Jain
this after_save :update_something after_destroy {|record| record.update_something(true)} But in this case, I need to make the function update_something public, which I don't want to do. Any help ? -- Arpit Jain --~--~-~--~~~---~--~~ You received this message because you

[Rails] Re: Polymorphic association..explain the extra query ?

2009-02-28 Thread Arpit Jain
hmm Right.. Thanks :) On Sat, Feb 28, 2009 at 5:27 PM, Frederick Cheung frederick.che...@gmail.com wrote: On Feb 28, 1:57 am, Arpit Jain arpitjai...@gmail.com wrote: So what's the solution to that Fred ? I would have to load question also when I load the subquestion ? That would mean

[Rails] Polymorphic association..explain the extra query ?

2009-02-27 Thread Arpit Jain
Can anyone explain to me the sql query done in the last step : http://pastie.org/402200 -- Arpit Jain --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email

[Rails] Re: Polymorphic association..explain the extra query ?

2009-02-27 Thread Arpit Jain
wrote: On Feb 27, 5:58 pm, Arpit Jain arpitjai...@gmail.com wrote: Can anyone explain to me the sql query done in the last step : http://pastie.org/402200 Because activerecord isn't super smart in this way and doesn't fill in associations bidirectionally when they are loaded. Fred

[Rails] Multiple Table Inheritance

2009-02-26 Thread Arpit Jain
Can anyone help me with this http://pastie.org/401752 -- Arpit Jain --~--~-~--~~~---~--~~ 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