title: Log user activities in ROR
body: <p>I have an application where there are two types of user currently, Admin and Vendor, and i want to log their activities like</p>
  
  <pre><code>"TestAdmin" viewed transaction
  "TestAdmin" added a new vendor
  "TestAdmin" edited a Transaction
  "TestVendor" added a new Transaction
  "TestAdmin" approved Transaction 
  "TestAdmin" rejected Transaction 
  etc...
  </code></pre>
  
  <p>where "TestAdmin" is an admin and "TestVendor" is a vendor</p>
  
  <p>But i m not sure what approach i should follow</p>
  
  <p>I m thinking of this </p>
  
  <p>Adding an Activity table in DB with following fields</p>
  
  <pre><code>user_id 
  browser
  session_id
  ip_address
  action
  params
  </code></pre>
  
  <p>and call </p>
  
  <pre><code>before_filter :record_activity
  </code></pre>
  
  <p>to record all activities</p>
  
  <p>but not sure how to create messages like above</p>
  
  <p>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.</p>
  
  <p>Please help and guide to some nice way to accomplish this. </p>
  
  <p>Thanks</p>