I''ve been devloping in Coldfusion for the last 3-4 years.. I''m looking into Ruby on Rails and was wonding how I can join tables in my database. Also, if I delete a Ex. Post, how can I make sure it deletes the comments...? Thank in Advance... I''m sure it something easy, just lost in a new world... -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ball, Donald A Jr \(Library\)
2007-Mar-30 15:01 UTC
Re: New to Ruby on Rails.. Database Relations?
> I''ve been devloping in Coldfusion for the last 3-4 years.. > I''m looking into Ruby on Rails and was wonding how I can join > tables in my database.Look at the :includes option for the finder methods of ActiveRecord::Base. Alternately, you can always invoke manual SQL queries with find_by_sql.> Also, if I delete a Ex. Post, how can I make sure it deletes > the comments...?See :dependent=>:destroy in ActiveRecord::Base to do it in rails; you could also tell your database to do it on_delete if your database permits. - donald --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ball, Donald A Jr (Library) wrote:>> I''ve been devloping in Coldfusion for the last 3-4 years.. >> I''m looking into Ruby on Rails and was wonding how I can join >> tables in my database. > > Look at the :includes option for the finder methods of > ActiveRecord::Base. > > Alternately, you can always invoke manual SQL queries with find_by_sql. > >> Also, if I delete a Ex. Post, how can I make sure it deletes >> the comments...? > > See :dependent=>:destroy in ActiveRecord::Base to do it in rails; you > could also tell your database to do it on_delete if your database > permits. > > - donaldOk, I should have specified.... I''m really new! I did not understand anything you just said.. Obviously I need to look into the ruby language.. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---