add updated at to students

This commit is contained in:
Seth Call 2018-01-16 22:07:02 -06:00
parent e27d645485
commit dacfc1abd3
1 changed files with 5 additions and 1 deletions

View File

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