mirror of
https://github.com/danbee/danbarberphoto
synced 2025-03-04 08:49:07 +00:00
Add display resource methods
This commit is contained in:
parent
c8d2146247
commit
c933197894
@ -61,7 +61,7 @@ class CategoryDashboard < Administrate::BaseDashboard
|
||||
# Overwrite this method to customize how categories are displayed
|
||||
# across all pages of the admin dashboard.
|
||||
#
|
||||
# def display_resource(category)
|
||||
# "Category ##{category.id}"
|
||||
# end
|
||||
def display_resource(category)
|
||||
category.name
|
||||
end
|
||||
end
|
||||
|
||||
@ -49,7 +49,7 @@ class PageDashboard < Administrate::BaseDashboard
|
||||
# Overwrite this method to customize how pages are displayed
|
||||
# across all pages of the admin dashboard.
|
||||
#
|
||||
# def display_resource(page)
|
||||
# "Page ##{page.id}"
|
||||
# end
|
||||
def display_resource(page)
|
||||
page.title
|
||||
end
|
||||
end
|
||||
|
||||
@ -75,7 +75,7 @@ class PhotoDashboard < Administrate::BaseDashboard
|
||||
# Overwrite this method to customize how photos are displayed
|
||||
# across all pages of the admin dashboard.
|
||||
#
|
||||
# def display_resource(photo)
|
||||
# "Photo ##{photo.id}"
|
||||
# end
|
||||
def display_resource(photo)
|
||||
photo.name
|
||||
end
|
||||
end
|
||||
|
||||
@ -44,7 +44,7 @@ class UserDashboard < Administrate::BaseDashboard
|
||||
# Overwrite this method to customize how users are displayed
|
||||
# across all pages of the admin dashboard.
|
||||
#
|
||||
# def display_resource(user)
|
||||
# "User ##{user.id}"
|
||||
# end
|
||||
def display_resource(user)
|
||||
user.email
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user