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.lock b/Gemfile.lock index 0ca1eed..466e019 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -150,7 +150,7 @@ GEM net-smtp (0.3.3) net-protocol nio4r (2.5.9) - nokogiri (1.15.3-x86_64-linux) + nokogiri (1.15.4-x86_64-linux) racc (~> 1.4) pagy (6.0.4) parallel (1.23.0) @@ -244,7 +244,7 @@ GEM parser (>= 3.2.1.0) ruby-progressbar (1.13.0) rubyzip (2.3.2) - selenium-webdriver (4.10.0) + selenium-webdriver (4.11.0) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) @@ -282,10 +282,10 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webdrivers (5.3.1) + webdrivers (5.2.0) nokogiri (~> 1.6) rubyzip (>= 1.3.0) - selenium-webdriver (~> 4.0, < 4.11) + selenium-webdriver (~> 4.0) websocket (1.2.9) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) 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