updating the database and working with ActiveRecord