def deal_with_abnormalaties

      self.cover_image = upload_images(cover_image, id.to_s, 'terms') if cover_image.class != String && cover_image.class != NilClass

      # if the slug is empty it will take the name and create a slug
      self.slug =
        if slug.blank?
          name.gsub(' ', '-').downcase.gsub(/[^a-z0-9\-\s]/i, '')
        else
          slug.gsub(' ', '-').downcase.gsub(/[^a-z0-9\-\s]/i, '')
        end

      self.structured_url = '/' + self.slug

    end
def deal_with_abnormalaties

      self.cover_image = upload_images(cover_image, id.to_s, 'terms') if cover_image.class != String && cover_image.class != NilClass

      # if the slug is empty it will take the name and create a slug
      self.slug =
        if slug.blank?
          name.gsub(' ', '-').downcase.gsub(/[^a-z0-9\-\s]/i, '')
        else
          slug.gsub(' ', '-').downcase.gsub(/[^a-z0-9\-\s]/i, '')
        end

      self.structured_url = '/' + self.slug

    end
will make sure that specific data is correctly formatted for the database