integrate with rails