remove dependency on rails3