I'm new to rails, and I'm trying to perform an ajax request. Correct me if I'm wrong, but as I understand it, requests are supposed to be performed with a link_to using :remote true.
I have this line of code, which links to the desired page:
link_to 'Log Out',{:controller=>"ajax_handlers", :action=>"logout"}, :class=>'navButton', :remote=>true
But when I click the link it still navigates to the log out page. I have seen other posts suggesting that this is caused by a syntax error which causes :remote => true to be added to the url as a query parameter. However, the html renders to this:
<a href="/logout" class="navButton" data-remote="true">Log Out</a>
Which to me looks like it should be working.
A final note: I've seen posts saying that they can't get this working because of some problem with jQuery configuration. However, I am not using jQuery (it could be a javascript configuration error, but I don't know).
Thanks in advance.