Problems while tracing code, cannot find definition of an action


redmine_dmsf is one of redmine’s plugin, and I am having trouble tracing its code:

In config/routes.rb, it assumes the controller dmsf_upload has an action multi_upload, but when I look into app/controllers/dmsf_upload_controller.rb, I can only find action with names upload but not multi_upload, so how does the code works?

Thanks in advance.

One of obscure Rails features is that if an action is not defined but there is a view template with the corresponding name, Rails will render the template when the action is called.

In this case a template exists: app/views/dmsf_upload/multi_upload.html.erb

It is equivalent to having an empty action:

def multi_upload

Thanks, these kinds of features in Rails make it so hard to debug!