I’m trying to include a list of data from a database table in a different model.
I have an Event model and a Venue model.
In the new Venue view I’d like to be able to include the list of existing venues to attach to an event so that administrators can link new event to existing venues and if I can manage it also allow for the creation of a new venue.
Is it in anyway possible?
When I try to get the @venue keys from the Event new view it just fails.
In the controller for that action you need to set
@venuesbefore you can use it in the view.