Another (hopefully) simple problem, but I’m finding little help on any
I currently have 2 tables, one with the users of a system and another
with the details of the program they are on, the program is referenced
in the users table with program_id.
Rails obviously hides this information in the list view as it is an id,
but i actually want it to cross reference the programs table and display
the program name (rather than the id, or nothing).
I’ve set the model up so that each user belongs to a program, and each
program has many users, and the edit page gives an option list with the
names of the programs and saves the id as you’d expect
I’ve seen one example that says simply writing program.name will do this
but I’ve had no joy… can someone shed some light/make it blindingly
obvious what I’m missing? thanks.
in case what I’ve written makes absolutely no sense, the offending
application can be found here:
as you can see, the users program is not displayed, but the edit page
allows the edit. I need to display the name of the program in the list.