added all attributes to database and changed back to attr_accessor