# Handling external links to methods in rails apps

**URL:** <https://www.ruby-forum.com/t/handling-external-links-to-methods-in-rails-apps/62986>\
**Category:** Rails\
**Created:** [June 10, 2006, 3:22am UTC](https://www.ruby-forum.com/t/handling-external-links-to-methods-in-rails-apps/62986 "2006-06-10T03:22:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/958977/32.png) [@chris](https://www.ruby-forum.com/u/chris)\
**Post date:** [June 10, 2006, 3:22am UTC](https://www.ruby-forum.com/t/handling-external-links-to-methods-in-rails-apps/62986/1 "2006-06-10T03:22:32Z")

</div>

I created the website [www.brandfetch.com](http://www.brandfetch.com) with Rails. I’ve noticed that  
Google & some search engines have indexed links into the site that are  
only meant to be reached through Ajax (link\_to\_remote) calls within the  
app. (e.g. [www.brandfetch.com/rails/web\_stats/get\_domain\_stats](http://www.brandfetch.com/rails/web_stats/get_domain_stats))

I know how to handle calls to an unknown method, but how can I handle  
these links/calls to implemented methods that aren’t supposed to be  
called directly?

Thank you,  
Chris

---

<div class="post-metadata">

**Author:** ![chris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/958977/32.png) [@chris](https://www.ruby-forum.com/u/chris)\
**Post date:** [June 10, 2006, 4:38am UTC](https://www.ruby-forum.com/t/handling-external-links-to-methods-in-rails-apps/62986/2 "2006-06-10T04:38:55Z")

</div>

Test against request.xhr? in the controller:  
[http://api.rubyonrails.org/classes/ActionController/AbstractRequest.html#M00](http://api.rubyonrails.org/classes/ActionController/AbstractRequest.html#M00)  
0175

Neat site!

---

<div class="post-metadata">

**Author:** ![chris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/958977/32.png) [@chris](https://www.ruby-forum.com/u/chris)\
**Post date:** [June 10, 2006, 7:47am UTC](https://www.ruby-forum.com/t/handling-external-links-to-methods-in-rails-apps/62986/3 "2006-06-10T07:47:40Z")

</div>

Very nice website…

This is the first site that I have seen that really shows of the power  
of AJAX and RoR!!

Great Job!!

Now that I’m thinking about it, where are some other RoR websites that  
shows this type of power…is there an update-to-date “Showcase” area  
somewhere for RoR websites?

Thanks

---

<div class="post-metadata">

**Author:** ![chris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/958977/32.png) [@chris](https://www.ruby-forum.com/u/chris)\
**Post date:** [June 10, 2006, 2:49pm UTC](https://www.ruby-forum.com/t/handling-external-links-to-methods-in-rails-apps/62986/4 "2006-06-10T14:49:45Z")

</div>

Chris wrote:

> I created the website [www.brandfetch.com](http://www.brandfetch.com) with Rails.

Great job! You might want to make the default route ‘’ work so one can  
bookmark your home page properly without extra path info – thereby  
allowing you to change controller names, etc. down the road.

Steven

---

<div class="post-metadata">

**Author:** ![chris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/958977/32.png) [@chris](https://www.ruby-forum.com/u/chris)\
**Post date:** [June 10, 2006, 7:55pm UTC](https://www.ruby-forum.com/t/handling-external-links-to-methods-in-rails-apps/62986/5 "2006-06-10T19:55:52Z")

</div>

Wow. Thanks everyone … That’s really encouraging!

I put a lot of time into building it–this is my first experience  
building a web app, and there was a ton to learn.

Steven–very good advice on the bookmarking. I hadn’t considered that.

I don’t know about a Rails showcase site. I remember coming across one  
some time ago, but I can’t remember where.

Thanks!  
Chris
