I'm writing a plugin for my redmine and I need to pass a param from my view to my controller. I'm trying to pass the param @repository.url
which already exists on my erb.html file.
Bellow are the code which I'm trying to work. Please, what am I doing wrong? :
_navigation.erb.html
<% if User.current.allowed_to?(:view_repository, @project) -%>
<div style="float: left; width: auto; padding-right: 1%">
<%= button_to_function l(:gerar_build_project), remote_function(:action => 'exec_client', :controller => 'GerarVersao', :with => "'id=' + $('@repository.url').value")%>
</div>
gerar_versao_controller.rb
def exec_client(url_branch)
.
.
.
end
Thanks.