# Escape method

**URL:** <https://www.ruby-forum.com/t/escape-method/116716>\
**Category:** Rails\
**Created:** [October 8, 2007, 11:14pm UTC](https://www.ruby-forum.com/t/escape-method/116716 "2007-10-08T23:14:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [October 8, 2007, 11:14pm UTC](https://www.ruby-forum.com/t/escape-method/116716/1 "2007-10-08T23:14:28Z")

</div>

I am trying to get this particular bit of code to work and am having  
little success. Bascially what I want is to have a link that turns into  
a dropdown list and when something in the list is selected I want that  
new item to turn back into a link with that selected item displayed as  
the link. Anyway, here is the code and I am not sure what the ‘:with’  
and am also not sure what the ‘escape’ method is doing either. Can  
anyone explain this to me? Thanks,

\<% func = remote\_function( :update =\> ‘exclude\_1’, :url =\> {:action =\>  
‘set\_exclude\_airline\_1’}, :with =\> “‘id=’ + escape(value)” ) -%\>

\<% @airlines = Airline.find( :all, :order =\> ‘name’ ) %\>  
\<% if @user.exclude\_air\_1.nil? %\>

"\>  
\<%= options\_from\_collection\_for\_select @airlines, ‘id’, ‘name’ %\>

-S
