This is a rails version of sagir