Andrew Porter wrote: > Preethi Sivakumar wrote: >> > Instead of accessing user.profiles (as simply as that) you are going to > always have to introduce a condition (or use named_scopes but ultimately > the same condition is there). This is complicated more so because your > condition needs to test a column on the join table so you are going to > be hand crafting all your finds to reference the status column. > > If you are accessing a table via user_id and status regularly it makes > sense to index your join table on (user_id, status) and possibly also on > (profile_id, status). This probably adds more overhead than a delete > would on a simpler table because changing the status will result in 2 > index updates. Deletes aren't that expensive.
yeah. thanks !!!! :) -- 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

