asm-products/verba

View on GitHub
app/views/users/show.html.haml

Summary

Maintainability
Test Coverage
= render 'layouts/side_bar'

.col-sm-9.user-posts
  = flash_message
  = link_to "Keep writing", new_post_path, class: "keep-writing pull-right"
  - unless @profile.current_users_profile?
    = link_to "❮ back to my profile".html_safe, profile_path, class: "back-main"
  %h1.title
    Posts
  - if @profile.posts.present?
    - @profile.posts.each do |post|
      = render partial: "posts/post", locals: { post: post }

    = will_paginate @profile.posts

  - else
    = render "posts/post_blank_state"