Skip to content

Instantly share code, notes, and snippets.

@s0ber
Last active December 12, 2015 00:08
Show Gist options
  • Save s0ber/4681352 to your computer and use it in GitHub Desktop.
Save s0ber/4681352 to your computer and use it in GitHub Desktop.
Blog post markup (HAML)
- @posts # we are getting it from controlle
- @posts.each do |post|
.blog_post
.blog_post__title= post.title
.blog_post__meta_data
.blog_post__date= post.created_at
.blog_post__author= post.author.full_name
.blog_post__content
- # trying not to use tags in css wherever it's possible,
- # because of unexpectable selectors weight (it's an ideal we should follow)
= simple_format(post.content, class: 'blog_post__paragraph')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment