Prepend a word to all ajax urls by some configuration change in rails app -


i have rails app in have used ajax calls url. want append project name ajax urls. 1 way edit urls. there other simpler way same?

to prepend word (let project_name) ajax calls in application write following code in js file:

$.ajaxsetup({     beforesend: function(data, settings) {         var url = "/project_name"+ settings.url;         settings.url = url;      } }); 

Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -