Handling external links to methods in rails apps


I created the website 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)

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,


Test against request.xhr? in the controller:

Neat site!


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?



Chris wrote:

I created the website 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.



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.