app/models/slug.rb
def activate!
    self.class.transaction do
      Slug.for(sluggable_type, sluggable_id).update_all(active: false)
      update_column :active, true
    end
  end
# Marks a slug as active and deactivates all other slugs assigned to the
# record.
Marks a slug as active and deactivates all other slugs assigned to the
record.
Marks a slug as active and deactivates all other slugs assigned to the record .
def activate!
    self.class.transaction do
      Slug.for(sluggable_type, sluggable_id).update_all(active: false)
      update_column :active, true
    end
  end
def activate! self . class . transaction do Slug . for ( sluggable_type , sluggable_id ) . update_all ( active : false ) update_column :active , true end end
Marks a slug as active and deactivates all other slugs assigned to the
record.
Marks a slug as active and deactivates all other slugs assigned to the record .