I've seen numerous discussions similar to this, but none that are exactly the same.
I am building a simple support ticket system where a ticket has_many entries.
I want to have a view that displays all the entries associated with a certain ticket and also have a link a user can click to add an entry to that ticket.
I have an 'edit' action in my Entry controller that is used to add/ edit entries.
I'm trying to figure out a good way to tell the 'edit' action which ticket the new entry belongs to.
I saw that I can use the link_to helper in my ticket template to add a link to the 'edit' action of the Entry controller. If I add :ticket => 1 to the list of options to the link_to helper then I can retrieve that value as params[:ticket] in the edit action.
Is this the accepted way to do this sort of thing?
I'm new to RoR so I'm trying to pick up any best practices I can...