Thanks again.
Ok i know why your saying to have a consistent sorting method, its so as 
to avoid a duplicate situation i.e. if i always sort by the letter and 
id then i will always save as ab and not ba. If theres already an ab 
there and i have some validations i can avoid reading in another ab. 
That bit i understand.

But the problem is i will only have, and ive tested this, a one way 
relationship. That is 'A' is an "alphabet" which has an 
"alphabet_partner" of 'b'.

I.e. a.alphabet_partner = b.

But that's the problem, 'B' is just an "alphabet_partner" in this 
pairing table. There is nothing in the pairing table nor the 
associations currently set that say b
"B" is ALSO an "alphabet" which has an "alphabet_partner" of 'A'.
i.e. b.alpahbet_partner == []. it will NOT yield 'A'

I have tried this with my setup and thats the result i get but also 
thinking about it makes me believe this can only be the end result.

I read up and i think (im not sure though) but i think i need something 
called bidirectional relationship. The only problem is I  dont know how 
to implement this.
Are you sure my results should be any different?
-- 
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to