I have an application where there are two types of user currently, Admin and Vendor, and i want to log their activities like
"TestAdmin" viewed transaction
"TestAdmin" added a new vendor
"TestAdmin" edited a Transaction
"TestVendor" added a new Transaction
"TestAdmin" approved Transaction
"TestAdmin" rejected Transaction
etc...
where “TestAdmin” is an admin and “TestVendor” is a vendor
But i m not sure what approach i should follow
I m thinking of this
Adding an Activity table in DB with following fields
user_id
browser
session_id
ip_address
action
params
and call
before_filter :record_activity
to record all activities
but not sure how to create messages like above
Also i want to figure out if any error occurs and when and why, so for this i take browser fields to figure out whether code doesn’t work in IE etc. but this is only one error track field.
Please help and guide to some nice way to accomplish this.
Thanks
Ok this is what i did…
First create table
created function in application controller
then call above function from any controller needed
like this….
Hence problem solved……
Thanks all for all their help….