I'm writing a plugin on Redmine.
I want to add a new method inside a existing controller of Redmine. The controller name is Repositories.
I wrote in repositories.rb the following code:
class RepositoriesController < ApplicationController
def exec_client
...
end
end
In routes.rb I put:
match '/projects/:id/repository', :controller => 'Repositories', :action => 'exec_client', :via => :post
In my view navigation.html.erb I wrote:
<%= button_to_function l(:gerar_build_project), remote_function(:action => 'exec_client', :controller => 'Repositories')%>
The code of class RepositoriesController was originally written on the file repositories_controller.rb.
But, when I click in my button I've created in my view, I get the following message:
AbstractController::ActionNotFound (The action 'exec_client' could not be found for RepositoriesController):
What's going wrong?