Replace rails dependency with railties >= 3.2