ruby-x.github.io/app/helpers/application_helper.rb

10 lines
233 B
Ruby
Raw Normal View History

2018-04-10 17:25:46 +02:00
module ApplicationHelper
2018-04-10 21:48:23 +02:00
def post_link(index)
post = Post.posts.values[index]
return "" unless post
link = post.date.to_s + " "
link += link_to( post.title , blog_post_url(post.slug))
link.html_safe
end
2018-04-10 17:25:46 +02:00
end