0

I have a Class Meeting from which derives MeetingOnline and MeetingOnSite.

I want to be able to use the views of Meeting for both MeetingOnline and MeetingOnSite.

Now when i do <%= render @meetings %> it asks me for meeting_on_lines/_meeting_on_line_partial. But i want him to use instead meetings/_meeting since what i want to show is shared between the 2 derived models.

In my controller i have @meetings = Meeting.all simply.

Any clues on how to achieve this ?

user3442206
  • 577
  • 1
  • 6
  • 22

1 Answers1

1

Explicitly set the partial. By jsut using render @meetings rails is making an assumption about which partial to use

<%= render partial: "meetings/meeting", collection: @meetings %>
j-dexx
  • 10,286
  • 3
  • 23
  • 36