[Rails] Concatenation problem

Guillaume
Fri, 09 Jun 2006 19:14:01 -0000

Hello,

I''m using a code similar to the previous one, slightly modified, like
that:

Person.reflect_on_all_associations.select { |r| @person.r.name.save }
where r.name = cars

When I''m using that code I expect ruby to interpret
@person.r.name.save to @person.cars.save, but it doesn''t.

I even tried @person.#{r.name}.save, but with that ''#'' all my
code fall
apart. I even try to concatenate with ''+'' but nothing worka.

I don''t know how to make Ruby understand that I want to use the value
inside r.name.

If someone has an idea, please I need your help.


Thank you very much.