A simple question. I'm wondering what the proper way to do this is. Say you have this:
Event
Venue.has_many :events
Performer.has_many :events
And for routing:
resources :venues do
resources :events
end
resources :performers do
resources :events
end
And you are in events/index.html.haml. What is the proper way to link to an internal action?
Option 1
= link_to "New event", {:action => :new}
Option 2
Using a named route like?
= link_to "New event", params[:performer_id] ? new_performer_event_path(params[:performer_id) : new_venue_event_path(params[:venue_id])
Option 3 or do you use a shallow route?
= link_to "New event", new_event_path
Just curious what the proper / industry standard way of doing this is. Isn't option 2 bad practice in general?
Thanks for your help.