diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 0000000..bcf2fb3 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,10 @@ +Naming/VariableNumber: + Enabled: false +Style/FrozenStringLiteralComment: + Enabled: false +Style/StringLiterals: + Enabled: false +Layout/LineLength: + Enabled: false +Style/StringConcatenation: + Enabled: false diff --git a/.solargraph.yml b/.solargraph.yml index 3973042..6573bd5 100644 --- a/.solargraph.yml +++ b/.solargraph.yml @@ -10,7 +10,6 @@ require: [] domains: [] reporters: - rubocop -- require_not_found formatter: rubocop: cops: safe diff --git a/Gemfile b/Gemfile index b1e74a4..96dfe6c 100644 --- a/Gemfile +++ b/Gemfile @@ -13,7 +13,7 @@ gem "propshaft" gem "pg", "~> 1.1" # Use the Puma web server [https://github.com/puma/puma] -gem "puma", "~> 5.0" +gem "puma", "~> 6.3" # Bundle and transpile JavaScript [https://github.com/rails/jsbundling-rails] gem "jsbundling-rails" diff --git a/Gemfile.lock b/Gemfile.lock index 0ca1eed..f4918d6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -164,7 +164,7 @@ GEM rack railties (>= 7.0.0) public_suffix (5.0.3) - puma (5.6.6) + puma (6.3.0) nio4r (~> 2.0) racc (1.7.1) rack (2.2.8) @@ -309,7 +309,7 @@ DEPENDENCIES jsbundling-rails pg (~> 1.1) propshaft - puma (~> 5.0) + puma (~> 6.3) rails (~> 7.0.6) rspec rspec-rails diff --git a/app/models/induction_period.rb b/app/models/induction_period.rb index da731cc..9eb70a2 100644 --- a/app/models/induction_period.rb +++ b/app/models/induction_period.rb @@ -21,4 +21,6 @@ class InductionPeriod < ApplicationRecord belongs_to :mentorship belongs_to :appropriate_body belongs_to :induction_programme + + scope :current, -> { where(finished_on: nil) } end diff --git a/app/models/tenureship.rb b/app/models/tenureship.rb index 99d6d80..6cc4498 100644 --- a/app/models/tenureship.rb +++ b/app/models/tenureship.rb @@ -19,4 +19,6 @@ class Tenureship < ApplicationRecord belongs_to :teacher belongs_to :school has_many :mentorships + + scope :current, -> { where(finished_on: nil) } end