Module: Mist::Permalink

Included in:
Post
Defined in:
lib/mist/permalink.rb

Instance Method Summary collapse

Instance Method Details



2
3
4
# File 'lib/mist/permalink.rb', line 2

def permalink(text)
  text.underscore.gsub(/[^a-zA-Z0-9]+/, '-').sub(/-$/, '')
end