I have 2 MYSQL tables correctly linked to my Rail application.
Table#1 represents the class Users
Table#2 represents the class Timezone
I can display the fields I want on Rails pages such as user/view or
timezone/view (when only accessing one table in a page).
However I am not able to view a page that would include a few columns of
BOTH the user table + one column from the timezone table. Both tables
are linked by the id field.
I believe the model is properly defined in \model by using a “belong to”
and “has many” statements to link both table.
- I try to display the timezone column by using
user.timezone.time_zone_name but I systematically get the following
error message (winXP, rail .14, msql 5, webrick):
" You have a nil object when you didn’t expect it!
The error occured while evaluating nil.time_zone_name"
Any idea what is the problem?