I am working on my first real RoR project and have a simple question
(I think it is anyway).
I have three tables:
I think I have the joins down with belongs_to, but how do I actually
go about displaying that data on the page? I want to display most of
the info from the events table, but need to pull the school name and
also the event_type name. My foreign keys are
events has a school id and events points to a key in event_types.
Here is my skeleton display:
<% for event in @events %>
<%=h event.event_name %>
<% end %>
And my model:
class Event < ActiveRecord::Base
class School < ActiveRecord::Base
Thank you for saving me from more grey hair!