app/models/ems/channel.rb in ems-0.0.8 vs app/models/ems/channel.rb in ems-0.0.9
- old
+ new
@@ -1,8 +1,12 @@
module Ems
class Channel < ActiveRecord::Base
extend FriendlyId
friendly_id :name, use: :slugged
+ def should_generate_new_friendly_id?
+ new_record?
+ end
+
# Validators
validates_uniqueness_of :slug
validates :slug, :presence => true
validates :name, :presence => true