RoR data collection without using form

Interesting question: I’m in the middle of developing a RubyOnRails
website
with a MySQL database backend. Most of it is going amazingly well, but
I’ve
hit a snag: I need to write some “event log” code. The client wants to
have
a DB table full of “events” - i.e. client logins, page views, client IP
addresses and so forth. I know how to get the actual data - for example,
there’s a nice Rails method called RemoteIP() that will cature an IP
address. Problem is I’m puzzling over how to write the class and methods
to
actually save the data into the DB. RoR doesn’t seem to have anything
like a
“PageLoad” event in the same way that .Net does, for example.

Please help, anyone!!

  • Matthew

http://api.rubyonrails.com/classes/ActionController/Filters/ClassMethods.html