Method: AutoPilot::TemplateHelper#file_name

Defined in:
lib/auto_pilot/template_helper.rb

#file_name(post_title) ⇒ Object



3
4
5
6
7
# File 'lib/auto_pilot/template_helper.rb', line 3

def file_name(post_title)
  prefix = Time.now.to_s.split(' ').first # TODO: simplify
  suffix = post_title.gsub(' ', '-').downcase.strip
  "#{prefix}-#{suffix}"
end