Two-way dictionary

Hi!

I’m working on a multi-language idioms mapping application in which
an expression object has a habtm relation with its own class.
I thus created a table ‘expressions_dictionary’ and would go about by
declaring something like:
has_and_belongs_to_many :peers,
:class_name => “Expression”,
:join_table => “expressions_dictionary”,
:foreign_key => “id_a”,
:association_foreign_key => “id_b”
Only that this way the dictionary would only work one way ? only
finding all the Bs mapped to A but not the Bs that have A mapped to
them.

What would be the best way to circumvent this default behaviour?
Thanks!

-Sebastian_______________________________________________
Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs