For admin panel i am using active admin gem. In active admin menu i want to show a notification to admin user if any new user is registered or any message is transfer between admin and user in system. Any suggestion for adding custom code to Admin menu will be appreciated.
In my system i am using below code to show notification for new arrival message.
<%= link_to received_messages_path(), :remote => true, :data_type => 'message', :class => 'is-active' do %>
<%= t('message') %>
<% if (msg_count = user_unseen_message_count(current_user)) > 0 %>
<span class="badge js-message-count" >
<%= msg_count %>
</span>
<% end %>
<% end %>
So, how can i add this code to active admin menu??
i'm new in rails but i hope this helps you. if you add a column with is_admin boolean type, you can validate user admin like this: