Hi.
I have a link_to_remote that should call a function in controller that updates the page using rjs.
The links are not hitting the controller. I click on the link and nothing happens in the log file. I suspect it is something small and silly in my syntax.
I would appreciate if someone could glance over the code and see if they can spot it - here it is:
rhtml:
<%= link_to_remote "YES",
:url => {:controller => 'users',
:action => 'toggle_user_roles',
:params => {:user_id => [user.id](http://user.id), :role_id => [role.id](http://role.id), :has_role => true}}%>
html:
<td id='1_1' style=
"text-align:center;" class="yes_style">
<a href
="#" onclick="new Ajax.Request('/users/toggle_user_roles/:id.:format?role_id=1&has_role=true&user_id=1', {asynchronous:true, evalScripts:true}); return false;"
>YES</a>
</td>
The problem is not in the controller as this onClick does not actually reach the controller.
thanks in advance
ivor