Created
July 24, 2016 07:47
-
-
Save AnkurVyas-BTC/2b5e33b0d77e4b2fc26e93ae3c956415 to your computer and use it in GitHub Desktop.
The view part to display the messages.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Messages</h1> | |
<!-- Todays messages --> | |
<% if @grouped_messages.present? && @grouped_messages[true].present? %> | |
<h3> Today </h3> | |
<% @grouped_messages[true].each do |msg| %> | |
<%= msg.content %> | |
<%= msg.created_at.strftime('%I:%M %p') %> | |
<br /> | |
<% end %> | |
<br /> | |
<% end %> | |
<!-- Month wise grouped messages --> | |
<% if @month_wise_sorted_alerts.present? %> | |
<% @month_wise_sorted_alerts.each do |hash_elements|%> | |
<h3> <%= Date::MONTHNAMES[hash_elements.first] %> </h3> | |
<% hash_elements.last.each do |msg| %> | |
<%= msg.content %> | |
<%= msg.created_at.strftime('%b %d') %> | |
<br /> | |
<% end %> | |
<br /> | |
<% end %> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment