lib/human_urls/sluggable.rb in human_urls-0.1.4.pre.alpha.0 vs lib/human_urls/sluggable.rb in human_urls-0.1.5.pre.alpha.0
- old
+ new
@@ -8,9 +8,10 @@
end
module ClassMethods
def sluggify(slug_param=:slug, generated_from: false)
validates_presence_of slug_param
+ validates_uniqueness_of slug_param
validates_length_of slug_param, maximum: 244
define_method(:to_param) do
send(slug_param)
end