Skip to content

Instantly share code, notes, and snippets.

@amiel
Created March 5, 2014 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amiel/9372273 to your computer and use it in GitHub Desktop.
Save amiel/9372273 to your computer and use it in GitHub Desktop.
classes helper
def link_to_post(post)
html_class = ["post"]
html_class << "active" if post.active?
link_to(post.title, post, class: html_class)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment