Make open source
This commit is contained in:
25
app/admin/attendees.rb
Normal file
25
app/admin/attendees.rb
Normal file
@ -0,0 +1,25 @@
|
||||
ActiveAdmin.register Attendee do
|
||||
scope :child?
|
||||
scope :diet?
|
||||
|
||||
controller do
|
||||
def apply_sorting(chain)
|
||||
params[:order] ? chain : chain.reorder(last_name: :asc, first_name: :asc)
|
||||
end
|
||||
end
|
||||
|
||||
index do
|
||||
column :first_name
|
||||
column :last_name
|
||||
column :email
|
||||
column :diet
|
||||
column :notes
|
||||
column :child
|
||||
column :updated_at
|
||||
end
|
||||
|
||||
config.batch_actions = false
|
||||
config.filters = false
|
||||
config.per_page = 500
|
||||
config.clear_action_items!
|
||||
end
|
Reference in New Issue
Block a user