1
0
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:
Daniel Barber 2018-09-22 11:48:21 -04:00
parent c8d2146247
commit c933197894
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8
4 changed files with 12 additions and 12 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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