Log user activities in ROR

后端 未结 5 1356
慢半拍i
慢半拍i 2021-01-30 23:25

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
\"T         


        
5条回答
  •  鱼传尺愫
    2021-01-31 00:19

    I think you should set model function where it catches the action like after_save ,after update and all , if your model is Transaction for the logs table fields can be

    user_id,
    model_name,
    action,
    ip_address,
    session_id,
    params
    

提交回复
热议问题