Recent Notes (last 10)
<% unless @notes.load.empty? %>
<% @notes.each do |note| %>
<%= note.created_at.strftime("%d %B %Y %H:%M UTC") %> by <%= User.find(note.author_id).username if note.author_id.present? %>
-
<% unless note.reason.blank? %>
<%= note.reason %>:
<% end %>
<%= note.content %>
<% end %>
<% else %>
No notes yet...
<% end %>
<%= form_with model: @user, url: admin_user_path(@user), method: :patch, html: { class: "mb-2" }, local: true do |f| %>
<%= f.label "Add new note: ", class: "d-block" %>
<%= f.text_area :new_note, class: "form-control" %>
<%= f.submit "Submit Note", class: "crayons-btn float-right" %>
<% end %>