Hello, i have a variable like /projects/3/blah blah or /projects/3 or just /projects
What I'd like to do is have an IF statement in Rails like this:
IF urlPath contains /projects proceed
Does Rails / Ruby have a method for that? Also, likely it shouldn't have a false positive for something like /books/projects or /authors/mr-projects/ etc...
jquery posting to Rails which them does the above evaluation:
$.ajax({
url: '/navigations/sidenav',
//data:{"urlpath":urlpath}, //
data: "urlpath=" + urlpath,
success: function(e){
$("#sideNav-container").slideDown("slow");
}
});