Make it work in Rails