RailsCasts Pro episodes are now free!

Learn more or hide this

Igor Markelov's Profile

GitHub User: pycckuu

Comments by Igor Markelov


Everything works great but I have one bug and can not understand why it doesnt work. My search script (which works on submit) works only on 2nd submission. First submit reloads the page and second submit sends AJAX request. After that if submit again -> reload, submit again -> ajax. (one after another)
Why it happens?
My application JS:
$(function () {
// Search form.

$('#identities_search').submit(function () {

$.get(this.action, $(this).serialize(), null, 'script');

return false;


$('#sortbut a, #sortbutq a, #identities .pagination a, #pagination a').live('click',
function () {
return false;



<%= controller.view_paths %> dont work. It shows me: #ActionView::PathSet:0x007fe6952365a8

What should I do?