-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1347 from SplitTime/oveson/madmin-resource-for-fi…
…le-downloads Add Analytics::FileDownload and Lotteries::EntrantServiceDetail to madmin
- Loading branch information
Showing
5 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
app/controllers/madmin/analytics/file_downloads_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module Madmin | ||
class Analytics::FileDownloadsController < Madmin::ResourceController | ||
end | ||
end |
4 changes: 4 additions & 0 deletions
4
app/controllers/madmin/lotteries/entrant_service_details_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module Madmin | ||
class Lotteries::EntrantServiceDetailsController < Madmin::ResourceController | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
class Analytics::FileDownloadResource < Madmin::Resource | ||
# Attributes | ||
attribute :id, form: false | ||
attribute :name | ||
attribute :filename | ||
attribute :byte_size | ||
attribute :created_at, form: false | ||
attribute :updated_at, form: false | ||
|
||
# Associations | ||
attribute :user | ||
attribute :record | ||
|
||
# Uncomment this to customize the display name of records in the admin area. | ||
# def self.display_name(record) | ||
# record.name | ||
# end | ||
|
||
# Uncomment this to customize the default sort column and direction. | ||
# def self.default_sort_column | ||
# "created_at" | ||
# end | ||
# | ||
# def self.default_sort_direction | ||
# "desc" | ||
# end | ||
end |
28 changes: 28 additions & 0 deletions
28
app/madmin/resources/lotteries/entrant_service_detail_resource.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
class Lotteries::EntrantServiceDetailResource < Madmin::Resource | ||
# Attributes | ||
attribute :lottery_entrant_id | ||
attribute :form_accepted_at | ||
attribute :form_rejected_at | ||
attribute :form_accepted_comments | ||
attribute :form_rejected_comments | ||
attribute :created_at, form: false | ||
attribute :updated_at, form: false | ||
attribute :completed_form, index: false | ||
|
||
# Associations | ||
attribute :entrant | ||
|
||
# Uncomment this to customize the display name of records in the admin area. | ||
# def self.display_name(record) | ||
# record.name | ||
# end | ||
|
||
# Uncomment this to customize the default sort column and direction. | ||
# def self.default_sort_column | ||
# "created_at" | ||
# end | ||
# | ||
# def self.default_sort_direction | ||
# "desc" | ||
# end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters