Forum: Ruby on Rails Logging / Statistics for AJAX Requests?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
510b6bc88c4cc7940c04b5791c280087?d=identicon&s=25 Ash (Guest)
on 2007-02-20 08:08
I've been working on a gallery in Rails. I'm using AJAX requests to
show/hide/move my images. Each image is contained in its own div with
information and a link to lightbox to pop up a larger version.

Everything works in that regard, however - I would like to add the
ability to log when a user clicks to view the larger 'lightboxed'
versions of the images. I figured something like that wouldn't be too
hard to implement, and that perception has caused me to spend the better
part of the day trying to fix it.

Right now I'm using "link_to". I thought I could have an action that
would receive the name of the requested image in the options hash, but
that doesn't work. I was thinking that I could just view the
xml_http_request directly, but I haven't found a way of doing that (as
the xml_http_request? just returns a bool).

I've looked all day for the answer to this, but I haven't found
anything, any input would be much appreciated. Thank you for your time.
This topic is locked and can not be replied to.