removed rails dependency, only activesupport and activerecord are needed