Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <% notifications = Notification.where(to_id: current_user.id).order(created_at: :desc) %>
- <div class="not_list_self">
- <% if notifications.size > 0 %>
- <ul>
- <% notifications.each do |notification| %>
- <li data-tab="reviews">
- <a href="<%= notification.post.link %>">
- <div class="notif_right"><div class="user_image" style="background-image:url(<%= notification.user.avatar.url %>);"></div></div>
- <div class="notif_text">
- <p><b><%= notification.user.fullname %></b> write review to your post <b><%= notification.post.title %></b> write review to your post </p>
- <span><%= notification.posted_at %></span>
- </div>
- </a>
- </li>
- <% end %>
- </ul>
- <% else %>
- <p>no notification</p>
- <% end %>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement