<% if (params[:note_type] == "Validation Errors" or params[:note_type] == "Error") && !params[:action_name] %>

Top

<% Notable::Request.select("note, action, COUNT(DISTINCT (user_type || user_id)) as count_user, COUNT(*) as count_all").where(note_type: params[:note_type]).group([:note, :action]).order("count_all desc").each do |agg| %> <% end %>
Errors Users Count
<%= agg.note %> <%= agg.action %> <%= link_to "view", params.merge(note: agg.note, action_name: agg.action) %> <%= agg.count_user %> <%= agg.count_all %>
<% end %> <% if params[:user_type] and params[:user_id] %>

<%= params[:user_type] %> <%= params[:user_id] %>

<% end %> <%= render partial: "stream", locals: {requests: @requests, show_user: !(params[:user_id] && params[:user_type])} %> <% if @requests.current_page != 1 %> <%= link_to "Prev", params.merge(page: @requests.current_page - 1), style: "margin-right: 20px;" %> <% end %> <% if @requests.size == @requests.limit_value %> <%= link_to "Next", params.merge(page: @requests.current_page + 1) %> <% end %>