E
Esteban Manchado Velázquez
Hi all,
I'm writing a small RoR application to make a presentation (I'll publish
the LaTeX/PDF slides and the app, but in Spanish), and I'm using the
has_and_belongs_to_many association.
I have this:
- Table A and table B, associated with h_a_b_t_m
- Table A_b with _additional fields_ (a_id, b_id, foo and bar)
The question is, how can I update the "foo" and "bar" values? When I call
a.bs, I can read the values of those fields, but updating doesn't seem to
work. It doesn't raise any exception, but doesn't update the database either.
What am I doing wrong? Is there any easy way to update the "foo" and "bar"
fields?
Regards,
I'm writing a small RoR application to make a presentation (I'll publish
the LaTeX/PDF slides and the app, but in Spanish), and I'm using the
has_and_belongs_to_many association.
I have this:
- Table A and table B, associated with h_a_b_t_m
- Table A_b with _additional fields_ (a_id, b_id, foo and bar)
The question is, how can I update the "foo" and "bar" values? When I call
a.bs, I can read the values of those fields, but updating doesn't seem to
work. It doesn't raise any exception, but doesn't update the database either.
What am I doing wrong? Is there any easy way to update the "foo" and "bar"
fields?
Regards,