add some rails magic