Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. <% notifications = Notification.where(to_id: current_user.id).order(created_at: :desc) %>
  2. <div class="not_list_self">
  3. <% if notifications.size > 0 %>
  4. <ul>
  5. <% notifications.each do |notification| %>
  6. <li data-tab="reviews">
  7. <a href="<%= notification.post.link %>">
  8. <div class="notif_right"><div class="user_image" style="background-image:url(<%= notification.user.avatar.url %>);"></div></div>
  9. <div class="notif_text">
  10. <p><b><%= notification.user.fullname %></b> write review to your post <b><%= notification.post.title %></b> write review to your post </p>
  11. <span><%= notification.posted_at %></span>
  12. </div>
  13. </a>
  14. </li>
  15. <% end %>
  16. </ul>
  17. <% else %>
  18. <p>no notification</p>
  19. <% end %>
  20. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement