Integration with rails 4