forked from saurabh/orbit4-5
Update slug for preview
This commit is contained in:
parent
e3b6250c09
commit
1b9a344611
|
@ -1,4 +1,4 @@
|
|||
module Slug
|
||||
module Slug
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
|
@ -15,8 +15,6 @@
|
|||
(self.slug_title.gsub(/[ "'*@#$%^&()+=;:.,?>|\\\/<~_!:,、。!?;「」〈〉【】/]/,'-')+"-"+self.uid).gsub(/-{2,}/,'-') rescue "-"+self.uid
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def generate_uid
|
||||
self.uid = rand(10**8).to_s
|
||||
generate_uid if self.class.where(:uid=>self.uid).size > 0
|
||||
|
|
Loading…
Reference in New Issue