Changed datamapper to activerecord