NameError in Madmin::Users#index
Showing /home/.../gems/madmin-1.2.7/app/views/madmin/fields/has_many/_index.html.erb where line #1 raised:
Rails couldn't find a valid model for Notification association. Please provide the :class_name option on the association declaration. If :class_name is already provided, make sure it's an ActiveRecord::Base subclass.
Extracted source (around line #50):
<% next if attribute.field.nil? %>
<% next unless attribute.field.visible?(action_name) %>
<td class="px-4 py-2"><%= render partial: attribute.field.to_partial_path("index"), locals: { field: attribute.field, record: record, resource: resource } %></td>
<% end %>
<td class="px-4 py-2 text-center">
And there is another error when click on the notification icon in navbar
NameError in NotificationsController#index
Rails couldn't find a valid model for Notification association. Please provide the :class_name option on the association declaration. If :class_name is already provided, make sure it's an ActiveRecord::Base subclass.
def index
# Convert the database records to Noticed notification instances so we can use helper methods
@notifications = current_user.notifications.map(&:to_notification)
end
end
Can we close this issue, since you are able to resolve it by installing the notice gem. Or do you believe this is still a bug to be addressed inside of madmin?
NameError in Madmin::Users#index Showing /home/.../gems/madmin-1.2.7/app/views/madmin/fields/has_many/_index.html.erb where line #1 raised:
Rails couldn't find a valid model for Notification association. Please provide the :class_name option on the association declaration. If :class_name is already provided, make sure it's an ActiveRecord::Base subclass. Extracted source (around line #50):
And there is another error when click on the notification icon in navbar
NameError in NotificationsController#index Rails couldn't find a valid model for Notification association. Please provide the :class_name option on the association declaration. If :class_name is already provided, make sure it's an ActiveRecord::Base subclass.