-
Notifications
You must be signed in to change notification settings - Fork 459
Expand file tree
/
Copy pathaudit_log_resource.rb
More file actions
31 lines (26 loc) 路 825 Bytes
/
Copy pathaudit_log_resource.rb
File metadata and controls
31 lines (26 loc) 路 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
class AuditLogResource < Madmin::Resource
# Attributes
attribute :id, form: false
attribute :created_at, form: false
attribute :ip, index: true
attribute :user_agent, index: true
attribute :referrer, index: true
attribute :kind, index: true
attribute :updated_at, form: false
# Associations
attribute :push
attribute :user
attribute :notify_by_email
# Add scopes to easily filter records
# scope :published
# Add actions to the resource's show page
# member_action do |record|
# link_to "Do Something", some_path
# end
# Customize the display name of records in the admin area.
# def self.display_name(record) = record.name
# Customize the default sort column and direction.
# def self.default_sort_column = "created_at"
#
# def self.default_sort_direction = "desc"
end