add updated at to students
This commit is contained in:
parent
e27d645485
commit
dacfc1abd3
|
|
@ -6,12 +6,15 @@ ActiveAdmin.register JamRuby::User, :as => 'Students' do
|
|||
config.batch_actions = false
|
||||
config.per_page = 100
|
||||
config.paginate = true
|
||||
config.filters = false
|
||||
config.filters = true
|
||||
|
||||
def booked_anything(scope)
|
||||
scope.joins(:student_lesson_bookings).where('lesson_bookings.active = true').uniq
|
||||
end
|
||||
|
||||
filter :jamuser_full_name_or_email_cont, label: 'Name Or Email', as: :string
|
||||
filter :school, label: 'School'
|
||||
|
||||
scope("Default", default: true) { |scope| scope.where('is_a_student = true OR jamclass_credits > 0 OR ((select count(id) from lesson_bookings where lesson_bookings.user_id = users.id) > 0)').order('users.ready_for_session_at IS NULL DESC') }
|
||||
|
||||
index do
|
||||
|
|
@ -50,6 +53,7 @@ ActiveAdmin.register JamRuby::User, :as => 'Students' do
|
|||
user.school.name
|
||||
end
|
||||
end
|
||||
column :updated_at
|
||||
end
|
||||
|
||||
member_action :mark_session_ready, :method => :get do
|
||||
|
|
|
|||
Loading…
Reference in New Issue