Is there a cleaner way to build the url in the following snippet?

$(function() {
  $('#name').change(function() {
    $.ajax({
      url: "<%= url_for({action: 'lookup'}) %>" + "?term=" + this.value,
        ...
      }
    })
  })
})

Note that I should not use a hard-coded URL, because this app should be 
deployed at a sub-URI using Passenger.

-- 
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice




-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en-US.

Reply via email to