Module: Foxynews::FoxynewsHelper

Defined in:
app/helpers/foxynews/foxynews_helper.rb

Instance Method Summary collapse

Instance Method Details

#to_slug(title) ⇒ Object



2
3
4
# File 'app/helpers/foxynews/foxynews_helper.rb', line 2

def to_slug(title)
  title.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '')
end