Rails routes and ajax -


i have problem:

my routes:

match 'questions/get_label/:id' => 'questions#get_label'                                ,:as => :question_get_label, :via =>  :post 

my js:

$.ajax({         url: 'questions/get_label/'+id,         type: "post",           success: function(){             //$('.preloader').hide()          }     }); 

server answer:

no route matches [patch] "/questions/get_label/2" 

what miss?


Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c# - Avoiding duplicate methods for Task and Task<T> -

javascript - Which segment of a polyline was clicked? -