Skip to content

Commit

Permalink
Fixes several lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaudouinjr committed Feb 5, 2024
1 parent db7c871 commit 9e24058
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 21 deletions.
2 changes: 1 addition & 1 deletion app/models/agreement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Agreement < ApplicationRecord

has_and_belongs_to_many :questionnaires

def self.ransackable_attributes(auth_object = nil)
def self.ransackable_attributes(_)
["created_at", "id", "name", "updated_at"]
end

Expand Down
2 changes: 1 addition & 1 deletion app/models/bus_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class BusList < ApplicationRecord

strip_attributes

def self.ransackable_attributes(auth_object = nil)
def self.ransackable_attributes(_)
["created_at", "id", "name", "updated_at"]
end

Expand Down
2 changes: 1 addition & 1 deletion app/models/message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Message < ApplicationRecord
validates_inclusion_of :template, in: POSSIBLE_TEMPLATES
validates_inclusion_of :type, in: POSSIBLE_TYPES

def self.ransackable_attributes(auth_object = nil)
def self.ransackable_attributes(_)
["created_at", "id", "name", "updated_at"]
end

Expand Down
2 changes: 1 addition & 1 deletion app/models/questionnaire.rb
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ class Questionnaire < ApplicationRecord
validates_inclusion_of :shirt_size, in: POSSIBLE_SHIRT_SIZES
validates_inclusion_of :acc_status, in: POSSIBLE_ACC_STATUS

def self.ransackable_attributes(auth_object = nil)
def self.ransackable_attributes(_)
["created_at", "id", "name", "updated_at"]
end

Expand Down
2 changes: 1 addition & 1 deletion app/models/school.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class School < ApplicationRecord

has_many :questionnaires

def self.ransackable_attributes(auth_object = nil)
def self.ransackable_attributes(_)
["created_at", "id", "name", "updated_at"]
end

Expand Down
4 changes: 2 additions & 2 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ class User < ApplicationRecord
enum role: { user: 0, volunteer: 1, organizer: 2, director: 3 }
scope :staff, -> { where(role: [:volunteer, :organizer, :director]) }

def self.ransackable_attributes(auth_object = nil)
def self.ransackable_attributes(_)
["created_at", "current_sign_in_at", "current_sign_in_ip", "email", "first_name", "id", "is_active", "last_name", "last_sign_in_at", "last_sign_in_ip", "provider", "receive_weekly_report", "role", "uid"]
end

def self.ransackable_associations(auth_object = nil)
def self.ransackable_associations(_)
["audits", "questionnaire"]
end

Expand Down
10 changes: 5 additions & 5 deletions app/views/manage/application/_questionnaires_datatable.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
.row
.col.text-right
= search_form_for(@questionnaires_search, as: :questionnaires_search, url: manage_questionnaires_path, data: {turbo_frame: :questionnaires_table, controller: "form", action: "input->form#submit"}, method: :get) do |f|
#{f.label :name_cont, "Search"}
#{f.search_field(:name_cont, class: "form-control form-control-sm")}
= f.label :name_cont, "Search"
= f.search_field(:name_cont, class: "form-control form-control-sm")

.row
.col
Expand All @@ -25,10 +25,10 @@
%td= link_to('<i class="fa fa-search"></i>'.html_safe, manage_questionnaire_path(questionnaire), target: "_top")
%td #{questionnaire.flags}
%td
%strong #{questionnaire.user.first_name}
%strong= questionnaire.user.first_name
%td
%strong #{questionnaire.user.last_name}
%td #{questionnaire.user.email}
%strong= questionnaire.user.last_name
%td= questionnaire.user.email
%td= "<span class=\"text-#{acc_status_class(questionnaire.acc_status)}\">#{Questionnaire::POSSIBLE_ACC_STATUS[questionnaire.acc_status]}</span>".html_safe
%td= yes_no_display(questionnaire.checked_in?)
%td= link_to(questionnaire.school.name, manage_school_path(questionnaire.school), target: "_top")
Expand Down
12 changes: 6 additions & 6 deletions app/views/manage/schools/_schools_datatable.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
.row
.col.text-right
= search_form_for(@schools_search, as: :schools_search, url: manage_bus_lists_path, data: {turbo_frame: :schools_table, controller: "form", action: "input->form#submit"}, method: :get) do |f|
#{f.label :name_cont, "Search"}
#{f.search_field(:name_cont, class: "form-control form-control-sm")}
= f.label :name_cont, "Search"
= f.search_field(:name_cont, class: "form-control form-control-sm")

.row
.col
Expand All @@ -23,10 +23,10 @@
%td= link_to('<i class="fa fa-search"></i>'.html_safe, manage_school_path(school), target: "_top")
%td
%strong= school.name
%td #{school.city}
%td #{school.state}
%td #{school.questionnaire_count}
%td #{yes_no_display(school.is_home)}
%td= school.city
%td= school.state
%td= school.questionnaire_count
%td= yes_no_display(school.is_home)

.row
.col
Expand Down
5 changes: 2 additions & 3 deletions db/seeds/development.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
10_000.times do
user=User.new(
user = User.new(
first_name: Faker::Name.first_name,
last_name: Faker::Name.last_name,
email: Faker::Internet.unique.email,
Expand All @@ -9,9 +9,8 @@
end

10.times do
bus_list=BusList.new(
bus_list = BusList.new(
name: Faker::Educator.unique.university
)
bus_list.save!
end

0 comments on commit 9e24058

Please sign in to comment.