# Does link\_to\_remote degrade to an HTML request?

**URL:** <https://www.ruby-forum.com/t/does-link-to-remote-degrade-to-an-html-request/174289>\
**Category:** Rails\
**Created:** [August 24, 2009, 1:41pm UTC](https://www.ruby-forum.com/t/does-link-to-remote-degrade-to-an-html-request/174289 "2009-08-24T13:41:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [August 24, 2009, 1:41pm UTC](https://www.ruby-forum.com/t/does-link-to-remote-degrade-to-an-html-request/174289/1 "2009-08-24T13:41:12Z")

</div>

I’m just looking at adding some AJAX to my app and am considering  
turning some link\_to’s into link\_to\_remotes and I could do with knowing  
if link\_to\_remote degrades to an HTML request if javascript is not  
enabled in a users browser?  
If so, is there anything special I need to do with the link\_to\_remote  
call to make that happen?

Thanks

---

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [August 24, 2009, 2:07pm UTC](https://www.ruby-forum.com/t/does-link-to-remote-degrade-to-an-html-request/174289/2 "2009-08-24T14:07:00Z")

</div>

just make sure you’ve include prototype.js.  
and enable javascript function on your browser.

regards.

On 8/24/09, James W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

–  
David A. Prasetya  
Ruby on Rails developer

> **[About Us - Enterprise Cloud & Mobile Development Company - WGS](https://www.wgs.co.id/)**
>
> wgs, pt wgs, walden global services, pt walden global services, WGS is one of the largest enterprise software development company based in Jakarta & Bandung, Indonesia.

removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [August 24, 2009, 2:11pm UTC](https://www.ruby-forum.com/t/does-link-to-remote-degrade-to-an-html-request/174289/3 "2009-08-24T14:11:41Z")

</div>

It will not degrade automatically, you’ll have to tell it to do so  
adding an :href property:

link\_to\_remote “Delete this post”,  
{ :update =\> “posts”, :url =\> { :action =\> “destroy”, :id =\> post.id  
} },  
:href =\> url\_for(:action =\> “destroy”, :id =\> post.id)

- 

Maurício Linhares  
[http://codeshooter.wordpress.com/](http://codeshooter.wordpress.com/) | [http://twitter.com/mauriciojr](http://twitter.com/mauriciojr)

On Mon, Aug 24, 2009 at 8:41 AM, James

---

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [August 24, 2009, 6:42pm UTC](https://www.ruby-forum.com/t/does-link-to-remote-degrade-to-an-html-request/174289/4 "2009-08-24T18:42:28Z")

</div>

David A. wrote:

> just make sure you’ve include prototype.js.  
> and enable javascript function on your browser.
> 
> regards.
> 
> On 8/24/09, James W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> > 
> > >
> 
> –  
> David A. Prasetya  
> Ruby on Rails developer  
> [http://www.wgs.co.id](http://www.wgs.co.id)  
> removed\_email\_address@domain.invalid

Thanks,  
I’m going to have a play with jQuery 🙂

---

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [August 24, 2009, 6:40pm UTC](https://www.ruby-forum.com/t/does-link-to-remote-degrade-to-an-html-request/174289/5 "2009-08-24T18:40:59Z")

</div>

MaurÃ­cio Linhares wrote:

> It will not degrade automatically, you’ll have to tell it to do so  
> adding an :href property:
> 
> link\_to\_remote “Delete this post”,  
> { :update =\> “posts”, :url =\> { :action =\> “destroy”, :id =\> post.id  
> } },  
> :href =\> url\_for(:action =\> “destroy”, :id =\> post.id)
> 
> - 
> 
> Maurï¿½cio Linhares  
> [http://codeshooter.wordpress.com/](http://codeshooter.wordpress.com/) | [http://twitter.com/mauriciojr](http://twitter.com/mauriciojr)
> 
> On Mon, Aug 24, 2009 at 8:41 AM, James

That’s exactly what I needed.  
Thank you very much
