Module: SexyToParam

Defined in:
lib/sexy_to_param.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.escape(slug) ⇒ Object



22
23
24
# File 'lib/sexy_to_param.rb', line 22

def escape(slug)
  URI.escape(slug.gsub(/[:@#\/&=\.\s]+/, '-').sub(/\A-/,''))
end