app/admin/content_versions.rb in activeadmin-audit-0.1.0 vs app/admin/content_versions.rb in activeadmin-audit-0.1.1
- old
+ new
@@ -3,11 +3,16 @@
actions :index, :show
filter :item_type, input_html: { class: 'chosen' }, as: :select
filter :event, input_html: { class: 'chosen' }, as: :select
- filter :whodunnit, input_html: { class: 'chosen' }, as: :select, collection: -> { AdminUser.all.map { |u| [u.email, u.id] } }
+ filter :whodunnit, input_html: { class: 'chosen' }, as: :select,
+ collection: lambda {
+ ActiveAdmin::Audit.configuration.user_class_name.to_s.classify.constantize.all.map do |user|
+ [user.email, user.id]
+ end
+ }
filter :created_at
index do
id_column
column :item
@@ -51,6 +56,6 @@
render partial: 'additional_objects_snapshot', locals: {
additional_objects_snapshot: version.additional_objects_snapshot,
}
end
-end
\ No newline at end of file
+end