Rails backend for user action logging