I'm new to rails and I'm trying to link to a specific method within a controller. My controller is called OrganismsController and the method is upload_reference_file. Through looking at other similar questions I now have a link_to working as
<%= link_to "Upload Reference Sequence", :controller => :organisms, :action => :upload_reference_file %>
However, I need to pass in the current organism to the method upload_reference_file. I've tried doing
<%= link_to "Upload Reference Sequence", :controller => :organisms, :action => :upload_reference_file(organism) %>
but rails complains that the above code is not correct syntax. Inside of my routes file I have the method matched to the controller action as
match '/organisms/upload_reference_file' => 'organisms#upload_reference_file'
Any help is very much appreciated. Thanks!