app/datatables/questionnaire_datatable.rb in hackathon_manager-0.12.2 vs app/datatables/questionnaire_datatable.rb in hackathon_manager-0.13.0

- old
+ new

@@ -8,11 +8,11 @@ last_name: { source: 'Questionnaire.last_name' }, email: { source: 'User.email' }, phone: { source: 'Questionnaire.phone' }, gender: { source: 'Questionnaire.gender' }, date_of_birth: { source: 'Questionnaire.date_of_birth', searchable: false }, - admin: { source: 'User.admin', cond: :eq, searchable: false }, + role: { source: 'User.role', cond: :eq, searchable: false }, acc_status: { source: 'Questionnaire.acc_status', searchable: true }, checked_in: { source: 'Questionnaire.checked_in_at', searchable: false }, school: { source: 'School.name' }, created_at: { source: 'Questionnaire.created_at', searchable: false }, dietary_restrictions: { source: 'Questionnaire.dietary_restrictions', searchable: true }, @@ -32,10 +32,10 @@ end def data records.map do |record| { - bulk: current_user.admin_limited_access ? '' : "<input type=\"checkbox\" data-bulk-row-edit=\"#{record.id}\">".html_safe, + bulk: current_user.admin? ? "<input type=\"checkbox\" data-bulk-row-edit=\"#{record.id}\">".html_safe : '', link: link_to('<i class="fa fa-search"></i>'.html_safe, manage_questionnaire_path(record)), note: note(record), id: record.id, first_name: bold(record.first_name), last_name: bold(record.last_name),