diff --git a/app/datatables/admin_datatable.rb b/app/datatables/admin_datatable.rb
index f31a7d6d5..59da7c13a 100644
--- a/app/datatables/admin_datatable.rb
+++ b/app/datatables/admin_datatable.rb
@@ -27,10 +27,7 @@ def data
end
end
- # rubocop:disable Naming/AccessorMethodName
def get_raw_records
User.where(role: [:admin, :admin_limited_access, :event_tracking])
end
-
- # rubocop:enable Naming/AccessorMethodName
end
diff --git a/app/datatables/bulk_message_datatable.rb b/app/datatables/bulk_message_datatable.rb
index be760bcd2..9eed0a716 100644
--- a/app/datatables/bulk_message_datatable.rb
+++ b/app/datatables/bulk_message_datatable.rb
@@ -8,7 +8,7 @@ def view_columns
subject: { source: "Message.subject" },
created_at: { source: "Message.created_at", searchable: false },
updated_at: { source: "Message.updated_at", searchable: false },
- delivered_at: { source: "Message.delivered_at", searchable: false }
+ delivered_at: { source: "Message.delivered_at", searchable: false },
}
end
@@ -20,17 +20,15 @@ def data
id: record.id,
name: link_to(bold(record.name), manage_message_path(record)),
subject: record.subject,
- status: record.status == 'drafted' ? "#{h(record.status.titleize)}".html_safe : record.status.titleize,
+ status: record.status == "drafted" ? "#{h(record.status.titleize)}".html_safe : record.status.titleize,
created_at: display_datetime(record.created_at),
- updated_at: record.updated_at.present? ? display_datetime(record.updated_at) : '',
- delivered_at: record.delivered_at.present? ? display_datetime(record.delivered_at) : ''
+ updated_at: record.updated_at.present? ? display_datetime(record.updated_at) : "",
+ delivered_at: record.delivered_at.present? ? display_datetime(record.delivered_at) : "",
}
end
end
- # rubocop:disable Naming/AccessorMethodName
def get_raw_records
- Message.where(type: 'bulk')
+ Message.where(type: "bulk")
end
- # rubocop:enable Naming/AccessorMethodName
end
diff --git a/app/datatables/checkin_datatable.rb b/app/datatables/checkin_datatable.rb
index 3bdccb816..90ab82922 100644
--- a/app/datatables/checkin_datatable.rb
+++ b/app/datatables/checkin_datatable.rb
@@ -3,19 +3,19 @@ class CheckinDatatable < AjaxDatatablesRails::Base
def view_columns
@view_columns ||= {
- first_name: { source: 'Questionnaire.first_name' },
- last_name: { source: 'Questionnaire.last_name' },
- checked_in: { source: 'Questionnaire.checked_in_at', searchable: false },
+ first_name: { source: "Questionnaire.first_name" },
+ last_name: { source: "Questionnaire.last_name" },
+ checked_in: { source: "Questionnaire.checked_in_at", searchable: false },
}
end
private
def about(record)
- output = ''
- output += [record.first_name, record.last_name].join(' ') + ' '
+ output = ""
+ output += [record.first_name, record.last_name].join(" ") + " "
output += 'Minor' if record.minor?
- output += '
' + record.school.name + ''
+ output += "
" + record.school.name + ""
output.html_safe
end
@@ -25,15 +25,13 @@ def data
first_name: record.first_name,
last_name: record.last_name,
about: about(record),
- checked_in: record.checked_in? ? "Yes".html_safe : 'No',
- actions: "View".html_safe
+ checked_in: record.checked_in? ? "Yes".html_safe : "No",
+ actions: "View".html_safe,
}
end
end
- # rubocop:disable Naming/AccessorMethodName
def get_raw_records
Questionnaire.includes(:user, :school).references(:user, :school)
end
- # rubocop:enable Naming/AccessorMethodName
end
diff --git a/app/datatables/questionnaire_datatable.rb b/app/datatables/questionnaire_datatable.rb
index 03f30bde5..9b2457713 100644
--- a/app/datatables/questionnaire_datatable.rb
+++ b/app/datatables/questionnaire_datatable.rb
@@ -54,9 +54,7 @@ def data
end
end
- # rubocop:disable Naming/AccessorMethodName
def get_raw_records
Questionnaire.includes(:user, :school).references(:user, :school)
end
- # rubocop:enable Naming/AccessorMethodName
end
diff --git a/app/datatables/school_datatable.rb b/app/datatables/school_datatable.rb
index cfd3ed0fe..0cb20229c 100644
--- a/app/datatables/school_datatable.rb
+++ b/app/datatables/school_datatable.rb
@@ -3,11 +3,11 @@ class SchoolDatatable < AjaxDatatablesRails::Base
def view_columns
@view_columns ||= {
- id: { source: 'School.id', cond: :eq },
- name: { source: 'School.name' },
- city: { source: 'School.city' },
- state: { source: 'School.state' },
- questionnaire_count: { source: 'School.questionnaire_count', searchable: false }
+ id: { source: "School.id", cond: :eq },
+ name: { source: "School.name" },
+ city: { source: "School.city" },
+ state: { source: "School.state" },
+ questionnaire_count: { source: "School.questionnaire_count", searchable: false },
}
end
@@ -20,14 +20,12 @@ def data
name: link_to(bold(record.name), manage_school_path(record)),
city: record.city,
state: record.state,
- questionnaire_count: record.questionnaire_count
+ questionnaire_count: record.questionnaire_count,
}
end
end
- # rubocop:disable Naming/AccessorMethodName
def get_raw_records
School.all
end
- # rubocop:enable Naming/AccessorMethodName
end