Skip to content

Commit

Permalink
Merge pull request #170 from Ches-ctrl/2024-05-25-code-audit
Browse files Browse the repository at this point in the history
2024 05 25 code audit
  • Loading branch information
Ches-ctrl authored May 26, 2024
2 parents 37094c3 + 0170c7e commit 8864c74
Show file tree
Hide file tree
Showing 179 changed files with 7,877 additions and 4,266 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,9 @@

# ignore .jar files
*.jar

# Ignore ruby-prof output
profile.html

# Ignore documentation
doc/**
3 changes: 3 additions & 0 deletions .slugignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@ CONTRIBUTING.md
# Ignore yml files generated by VCR.
spec/fixtures/cassettes/ApplicantTrackingSystem/*.yml

# Ignore documentation
doc/**

# rubocop:enable all
157 changes: 157 additions & 0 deletions .yardoc/checksums
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
lib/constants.rb db75655b16b51919e68d8d21bc5a9db505136b39
app/models/job.rb c8a8e3fde7af1d7dd511b8317e6cc69647102620
lib/ats_router.rb d4d33443b2cbdd1a2f6175a1c725e8b90aa0f9a0
lib/user_agent.rb d685eab45d17f78d57211fb4128d4116079ea23a
app/models/role.rb 5900ecaa26cb97547adfa6447df98a8b63472538
app/models/user.rb a0ce6f5de5d3846337caaf7848b01bad16350fc1
lib/ats_builder.rb 95230ac2398e31326a9cbc35fb2e841c6e9b9a44
lib/user_builder.rb d3b5d359908276ae2dfd4e7c231765ccf0fa5b87
app/jobs/apply_job.rb 08cecf605d20190ef343a68ee0e8c7ab225c5e65
app/models/company.rb dde5d1b6f1cce1cab5b602b9b553827299487039
app/models/country.rb 54731521084d0bba1c9c4df8b092da8edaac2ff7
app/models/message.rb 965f52426079e02b0fb641517c813a3f38d99659
app/models/location.rb ffac4b5d21cbcc2fa9be4d496b5eb8df20665ff9
lib/ats_identifiers.rb 449a563ad3360cb664865608ffd6d2bb48029027
lib/company_builder.rb a2dbf5c11b124b5a020424758162622f9bd4b140
app/models/education.rb 8be8c94d53d726da4ade1c319b05571fe41d8df2
app/models/job_board.rb 83f66afcc1c1ad94ce4ae3bfdecbf6c7ebbbbabc
app/models/jobs_role.rb 1d08d43485636b7cda388b18d12f5bf76d8b8f70
app/models/saved_job.rb 40230f12ba6b3e1fa36f5e40c8255496948bc530
lib/industry_builder.rb cdf1490f0c0d8effa9b08be57b716e68b8c606e7
app/avo/resources/job.rb e444f9ce504c7d2d81bf5a93353415de18616aba
app/models/technology.rb 27c0a223c4c9c2e440b99a4f36f5c7cb0de35942
lib/ats_system_parser.rb aeb5b2ded623fb7e7b9b58237c362ff5a0a56713
app/avo/resources/user.rb 3b29981e315190e4e8c4872edff7d5e1f89015c9
app/models/requirement.rb 2cf3b1d76b3d67737e3bca7f140fcaee8a699e16
app/mailers/user_mailer.rb f2acf493e945c2ebb7f5ba624673fee0d791778f
app/models/jobs_country.rb 707d2286da9547a0e35d4cf9f4cbce33d6eac105
app/services/job_filter.rb e1fdab9d700d85ac021d6bfa6867b4d5bc48b711
app/jobs/application_job.rb 4df10cd035a109f744eee2c6efec7b1a55eacb57
app/models/jobs_location.rb 8e0c5133c80c38429fdf793609b13ef5ea1d0e45
app/services/form_filler.rb 430136ade9dd47ca7103b05e9ef26c73cd64100d
app/avo/resources/company.rb aec6286582ecd4b3df87252d32c1b53c66598bcb
app/avo/resources/message.rb 3609e118b739d046f1df4f3d95a0d7d90ca05f58
app/jobs/xml/workable_job.rb 8a8aa2a48a6ca0d2bc0edb633ca85589e2f6dc7b
app/services/xml/workable.rb fab7767818f88b7e0ab131a261ba8488b285dd05
lib/external_server_error.rb b00697eb8dd50605d975a40c105133c669ee442f
app/models/job_application.rb dbeaff53ae1deede8084bf438ab778a23fbea418
app/services/email/hubspot.rb 49a1474236a574fe1eac479b394ddaf46c23f8eb
lib/no_data_returned_error.rb 457e214986c02a1c6e3ee22b67a4ec6d6009cddd
app/avo/resources/education.rb d4c9612b59097aaebc959c1f104ce38e95f787f0
app/avo/resources/saved_job.rb 24b4518eaef660a2fd663a21ec9752f55ed90b83
app/jobs/api/devit_jobs_job.rb cc20c1b189cea09fc261c2537137b7563e8332c9
app/jobs/build/all_jobs_job.rb 7066fe2ba765d7361a8fb5b5f3340c25a12b1259
app/jobs/scrape_true_up_job.rb e3f674c9c1d9ee675f11cee81e4f6e7c1e9d80e8
app/services/api/devit_jobs.rb f3128049cbe7f210688e7df68648e29f99239e3d
app/services/build/all_jobs.rb 084db9d7f9dbb00132ead428bc803ce06646568a
app/services/email/sendgrid.rb e76f7d0c861f700f7a673a72e9049a8c3640a7f8
app/jobs/get_form_fields_job.rb 31d4a4c527618dd88d3ceaa8c69363da8347dad6
app/models/concerns/relevant.rb 8aac81740548703665ad3582f8664584a59c710a
app/models/application_record.rb 3ddc096670c55bf364746588cd1f8471008ca6e8
app/services/category_sidebar.rb bce1ab5a6e3b1f8977e9a5d25008e05dfcc9206a
app/services/scrape_meta_tags.rb b825cb1ae80c70be5eb23f33842ecd33d640fbd9
app/controllers/csv_controller.rb f91ba6385d3bdb3436fb66cba94e13d89eea66b9
app/helpers/application_helper.rb eef3d3adce96afe8b14c19b6135323f47543d979
app/mailers/application_mailer.rb 79afbabf0317d864606ce6383f54416d946d80e0
app/services/check_job_is_live.rb aff372a5fcdcd8423a5eb44b4bd422d3fa68c0be
app/services/get_net_zero_data.rb b77c621eb7af0af8ea4b8bf19a3f12ec480bbc72
app/controllers/jobs_controller.rb b707f0aef797d584418e18096f63fcb33bf00ab7
app/helpers/job_listings_helper.rb 906396c2875403b06e2e4af7b730ab4410314742
app/models/application_response.rb c58cde49e68a37e52a3c782b50be393fc8311aa6
app/models/concerns/company_csv.rb 1f4283f8cbe41a8319feb73114f092c86ba8fd13
app/controllers/pages_controller.rb 119f81fd43a50986807678fa9fee07cfeea20814
app/controllers/users_controller.rb f2e301eaf304793232535e64a1b3fadd890e6b35
app/jobs/build/all_companies_job.rb 0c75b6102d36e5408bfc02a9f4639d09711f81e0
app/services/application_service.rb 67fc7cfd6e8f6937753b66f712056c4631984f3f
app/controllers/emails_controller.rb b326b27af8ec856b065532eabb3613219313f115
app/services/get_relevant_job_urls.rb f7af57b001ccb3882f76dc5bd5c9dd15927537f2
app/services/job_filtering_service.rb ee90cc9d8557d513c8b5db8127431b801c79785e
app/controllers/avo/jobs_controller.rb 599165515542e9c6f79e921934ef9428f3bd563d
app/controllers/messages_controller.rb 2afa42b7fbc7dc9abdd055abe3e4e3c47bd7abc3
app/models/concerns/university_list.rb 0f373bc2f3acea7bcd354021fb511f333bb53aba
app/services/company_domain_service.rb 79b82ca1c30b3e085319cc7b8f54dcf3cec36fd6
app/services/csv/export_data_to_csv.rb 53326121e8023070525d5591bb1542abb69f0d56
app/controllers/avo/users_controller.rb 9238e2bba11fc49cfcc711df75d477fd9c65918c
app/controllers/companies_controller.rb 7772a2da296c8058cb51841f5ade10f0fc78e86e
app/models/applicant_tracking_system.rb 06501f8ae86449d7be5320f7dc59b25fd32bdb4f
app/services/url/create_job_from_url.rb b555daab89f2b7d648c8337237f9b3fd88f0c341
app/channels/job_applications_channel.rb fb729fe599f0b39bcc9972a3edbd153b1bbaee17
app/controllers/educations_controller.rb d58d6fbf985cb17c308ac5669ffcf4730ff383ee
app/controllers/saved_jobs_controller.rb 75daf475e6c1f02e5311d6a1bf82f14620159c47
app/jobs/update_existing_company_jobs.rb d1ae01de053b733c0bb69594a7d564db577ad503
app/services/company_industry_service.rb 1312ebd5e9cc0b85e2d4904e903f8e103dc7560a
app/avo/resources/application_response.rb 6b03d74535e7c11a940313b81eb6085a3709510a
app/channels/application_cable/channel.rb 54156ee2853cfdea4e3147cdb260776b8d90b646
app/controllers/api/v0/jobs_controller.rb c8640e544f9700c4c3faa3ee940e6ebb24234bd4
app/controllers/application_controller.rb 68e47a049f3108a0f9a244f9d4cd6a55b7bae930
app/models/concerns/check_url_is_valid.rb a72cd4a9dd7dbb707edf01d765cc10afa43f0272
app/controllers/avo/messages_controller.rb c42c650b14220b6bd6c2dd7746c138a433b51084
app/models/concerns/ats/lever/parse_url.rb d5550fed2fcbdb72a7911e253625a5eeb767ce28
app/models/concerns/ats_url_identifiers.rb 89ebb0b21abee888a5b3cfe5590ae462cbda585d
app/controllers/avo/companies_controller.rb d3f3b7ca9e8e5cd467bfadaabb6a3ca61b9343cc
app/services/company_description_service.rb 94c658d4a35f75d9a3f712dae17c0c2b6a7d5dfe
app/services/url/create_company_from_url.rb e28445dfbe0883e6ecd95c004cae194e8acf7765
app/channels/application_cable/connection.rb 1bb74a09c0ee024e9ac99f42976d55d3799a127d
app/controllers/avo/educations_controller.rb a16db0a0753e6aab318e188704a1daaa79197537
app/controllers/avo/saved_jobs_controller.rb b9bae85f3f64fcaabc719a383b5653762de8fddd
app/models/concerns/ats/ashbyhq/parse_url.rb 37987801ed12481f9a65d827115597457b320cbe
app/models/concerns/ats/lever/job_details.rb c90c9d5e9d210f0f01eaa24607e7961aa87af207
app/models/concerns/ats/manatal/parse_url.rb 068851b1dbbe668d3d2ba34ad701d610bff9c8a8
app/models/concerns/ats/bamboohr/parse_url.rb 2529adb230cdcf4d606a2e56a780f242d3d411ec
app/models/concerns/ats/workable/parse_url.rb 458940bb6383ad9d0d721dd2b69daef76a7c29b5
app/services/standardizer/job_standardizer.rb 2b3e092027763341c931828fd5ea55442bf5e6b6
app/avo/resources/applicant_tracking_system.rb b29f55d79109ae8dd900e1521ee3630da9de559a
app/controllers/job_applications_controller.rb 65c9fb473bcec5f86e4997d3900b74661be465d2
app/models/concerns/ats/ashbyhq/job_details.rb f91a2df1d2c993ed123e1781f16e8bb7131f974a
app/models/concerns/ats/devitjobs/parse_url.rb f79611ea5aa645e738627508c7d2c93bfd35b67b
app/models/concerns/ats/manatal/job_details.rb d12555b17d3a50a58db048dd4bf0cc3f02693770
app/models/concerns/ats/recruitee/parse_url.rb d02b6145d10867b3a4c4f6b3fb4e81d72dfc405d
app/services/standardizer/role_standardizer.rb 74bcd86e71c9b7fad96eed684b3854286179fc28
app/models/concerns/ats/bamboohr/job_details.rb 3bb545be88a0a45ebe540085c5e5662bb1cc2697
app/models/concerns/ats/greenhouse/parse_url.rb 1032c16e3c4587f46374149b7f999e7571e884b0
app/models/concerns/ats/pinpointhq/parse_url.rb 37dff963bfa3dc48fe7f23a645106fb26034bdc0
app/models/concerns/ats/workable/job_details.rb b91a9eb8e83aae79a23a262691b1b2f5f6578153
app/models/concerns/ats/devitjobs/job_details.rb 4a2029dcc0c374f9a0be5c4ea064dc1ccdd297f6
app/models/concerns/ats/lever/company_details.rb 070d5d3dfbafdede39b5c3dd77f6e0394b3834c3
app/models/concerns/ats/recruitee/job_details.rb d2b87a90e0fc34c33cce77ed888c4fc8080cb1c7
app/services/standardizer/salary_standardizer.rb 1d4364c2dc5f2d084112525e7cd71f074a6978a6
app/models/concerns/ats/greenhouse/job_details.rb e232741d3f5e8b7d181be613ed1af9cc247a2594
app/models/concerns/ats/pinpointhq/job_details.rb e61d267f674f33939d735c633396d148d349612c
app/models/concerns/ats/ashbyhq/company_details.rb 5b83a6a7334e8d8c3f5091e4608ea9b108f26019
app/models/concerns/ats/manatal/company_details.rb 28dc9b869712197e96355671540f16809a8b7a59
app/services/standardizer/deadline_standardizer.rb 7fac2ae6bb336fdb3d0e09dbaed046bfa09eab73
app/services/standardizer/location_standardizer.rb 753776aa386899fe883df4c7a974419e645a19c8
app/models/concerns/ats/bamboohr/company_details.rb d8ba2cbbec48679711e5e196a91c2ef2615f0680
app/models/concerns/ats/lever/application_fields.rb f659a20e08141ed6ed8b9899a403ed9afc2eae33
app/models/concerns/ats/lever/fetch_company_jobs.rb 3c69178e314bd36bffe0562ca76e52bb8eb2a473
app/models/concerns/ats/workable/company_details.rb b595ee7d72d897d9a5c2299361449ba938348ec3
app/services/standardizer/seniority_standardizer.rb 973ff8a30d262b660860e309bfb37408fd100ea0
app/models/concerns/ats/devitjobs/company_details.rb b4d2d38ef620767bfde571d8276ce9c25252f6e7
app/models/concerns/ats/recruitee/company_details.rb 38fe68c7b545ac44f2acbb6667b80c65a0dc0b49
app/models/concerns/ats/smartrecruiters/parse_url.rb 4b409417518da1daac35b73a3096b0921c92a7ee
app/models/concerns/ats/ashbyhq/application_fields.rb c29ebe60c1e763895f7c54f76dca149c93aa5281
app/models/concerns/ats/ashbyhq/fetch_company_jobs.rb ffc37d47e518e52027d376189ec3fe3792807189
app/models/concerns/ats/greenhouse/company_details.rb af8a6463d851948e5cb9decb4ac35bebff8b51db
app/models/concerns/ats/manatal/application_fields.rb 46f4072548881f8d0b7a6d18ac1f6d53e789dfc1
app/models/concerns/ats/manatal/fetch_company_jobs.rb bdd45e3fc14d6989b9feaf2f6f846fde74d30a46
app/models/concerns/ats/pinpointhq/company_details.rb a9f9247a3b372c2801801a36ed78671370d50f61
app/models/concerns/ats/bamboohr/application_fields.rb 4e43197b91fbda9bda6db67db119b0bd5fbd3262
app/models/concerns/ats/bamboohr/fetch_company_jobs.rb c82de6ecd936303d8a7ced7e4195f4bf9d86716b
app/models/concerns/ats/smartrecruiters/job_details.rb fa1d4df0f7fcedf2fe976de0517fd58fdb0c87da
app/models/concerns/ats/workable/application_fields.rb 6d24ca096c6e55fcb27df586fcb528cb91c70d09
app/models/concerns/ats/workable/fetch_company_jobs.rb 49e95eaf09cd7f3c4207fac963bf17ebd1e0f95f
app/controllers/avo/application_responses_controller.rb a294d929b8371e5f94aff6ae029c60bdc3656f67
app/models/concerns/ats/devitjobs/application_fields.rb 18f48fd3740d03c46eae6124b75a3ba57c7cad57
app/models/concerns/ats/devitjobs/fetch_company_jobs.rb 18559674fa389122d97f845e539c9a52cd7d2c56
app/models/concerns/ats/recruitee/application_fields.rb d13d5f2f42d062bdb48ffe6628b1581163ed2182
app/models/concerns/ats/recruitee/fetch_company_jobs.rb 55062d6bf38a4d499a01d6b77f89e12d9f4e6ad7
app/models/concerns/ats/recruitee/submit_application.rb 8f5893d2975116ee360791c1d98a26e106612be1
app/models/concerns/ats/greenhouse/application_fields.rb 260ace1b1bcc1ab634216e8b782f882590186e45
app/models/concerns/ats/greenhouse/fetch_company_jobs.rb e82761028713b48f48c72b2cf451caa07eed8f2a
app/models/concerns/ats/greenhouse/submit_application.rb 4a56102e1567696e2dd4cdeee149af515ec2757a
app/models/concerns/ats/pinpointhq/application_fields.rb 4bc3f02d3ceee60ae403ba4d003a621df7ecbdd6
app/models/concerns/ats/pinpointhq/fetch_company_jobs.rb a7210c73779fe31f97ee4b613996d5f925afdf94
app/models/concerns/ats/smartrecruiters/company_details.rb 8c4c405f15caf18f91470669372dd1efb9dc5426
app/controllers/avo/applicant_tracking_systems_controller.rb 76c7fa8be9f287ce07d1867e7daf74dbc58452cf
app/models/concerns/ats/smartrecruiters/application_fields.rb 130e5da2d1804d1bbc44a344df435dff99443f70
app/models/concerns/ats/smartrecruiters/fetch_company_jobs.rb 9a51a6502a0d14f01b6cf461290a7c50cce3b5e1
Empty file added .yardoc/complete
Empty file.
Binary file added .yardoc/object_types
Binary file not shown.
Binary file added .yardoc/objects/root.dat
Binary file not shown.
Binary file added .yardoc/proxy_types
Binary file not shown.
9 changes: 8 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,11 @@ group :development, :test do
gem "debug", platforms: %i[mri windows]
gem "faker"
gem 'rspec-rails', '~> 6.1.0'
# gem 'rspec-benchmark' # Additional gem for benchmarking tests
gem 'rubocop-performance'
gem 'rubocop-rails'
gem 'rubocop-rspec'
gem 'ruby-prof'
# gem 'parallel_tests' # TODO: install this gem for parallel testing

# Security
Expand All @@ -144,14 +146,19 @@ group :development do

# Performance
# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
# gem "rack-mini-profiler" # TODO: install this gem for performance monitoring
gem "rack-mini-profiler"
# gem 'memory_profiler' # Additional gem for memory profiling
# gem 'stackprof' # Additional gem for call-stack profiling flamegraphs

# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
# gem "spring"

# gem "error_highlight", ">= 0.6.0", platforms: [:ruby]

gem "rails_best_practices"

# ERD Generation
gem 'rails-erd'
end

group :test do
Expand Down
30 changes: 29 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,13 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
choice (0.2.0)
cloudinary (2.0.2)
faraday (>= 2.0.1, < 3.0.0)
faraday-follow_redirects (~> 0.3.0)
faraday-multipart (~> 1.0, >= 1.0.4)
code_analyzer (0.5.5)
sexp_processor
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
crack (1.0.0)
Expand Down Expand Up @@ -160,6 +163,7 @@ GEM
drb (2.2.1)
dry-initializer (3.1.1)
erubi (1.12.0)
erubis (2.7.0)
et-orbi (1.2.11)
tzinfo
ethon (0.16.0)
Expand Down Expand Up @@ -304,6 +308,8 @@ GEM
rack (2.2.9)
rack-cors (2.0.2)
rack (>= 2.0.0)
rack-mini-profiler (3.3.1)
rack (>= 1.2.0)
rack-session (1.0.2)
rack (< 3)
rack-test (2.1.0)
Expand All @@ -329,9 +335,22 @@ GEM
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-erd (1.7.2)
activerecord (>= 4.2)
activesupport (>= 4.2)
choice (~> 0.2.0)
ruby-graphviz (~> 1.2)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
rails_best_practices (1.23.2)
activesupport
code_analyzer (~> 0.5.5)
erubis
i18n
json
require_all (~> 3.0)
ruby-progressbar
railties (7.1.3.3)
actionpack (= 7.1.3.3)
activesupport (= 7.1.3.3)
Expand All @@ -348,6 +367,7 @@ GEM
regexp_parser (2.9.2)
reline (0.5.7)
io-console (~> 0.5)
require_all (3.0.0)
responders (3.1.1)
actionpack (>= 5.2)
railties (>= 5.2)
Expand Down Expand Up @@ -403,10 +423,13 @@ GEM
rubocop-rspec_rails (~> 2.28)
rubocop-rspec_rails (2.28.3)
rubocop (~> 1.40)
ruby-graphviz (1.2.5)
rexml
ruby-openai (7.0.1)
event_stream_parser (>= 0.3.0, < 2.0.0)
faraday (>= 1)
faraday-multipart (>= 1)
ruby-prof (1.7.0)
ruby-progressbar (1.13.0)
ruby_http_client (3.5.5)
rubyzip (2.3.2)
Expand All @@ -427,6 +450,7 @@ GEM
websocket (~> 1.0)
sendgrid-ruby (6.7.0)
ruby_http_client (~> 3.4)
sexp_processor (4.17.1)
shoulda-matchers (6.1.0)
activesupport (>= 5.2.0)
sidekiq (6.5.12)
Expand Down Expand Up @@ -544,13 +568,17 @@ DEPENDENCIES
psych (~> 5.1.2)
puma (>= 6.4.2)
rack-cors
rack-mini-profiler
rails (~> 7.1.2)
rails-erd
rails-html-sanitizer
rails_best_practices
rspec-rails (~> 6.1.0)
rubocop-performance
rubocop-rails
rubocop-rspec
ruby-openai
ruby-prof
sassc-rails
selenium-webdriver (~> 4.18.1)
sendgrid-ruby
Expand All @@ -574,4 +602,4 @@ RUBY VERSION
ruby 3.1.3p185

BUNDLED WITH
2.5.6
2.5.10
1 change: 1 addition & 0 deletions app/assets/builds/tailwind.css

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions app/avo/resources/job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ def fields
field :applicant_tracking_system, as: :belongs_to
field :job_applications, as: :has_many
field :saved_jobs, as: :has_many
field :playlist_jobs, as: :has_many
field :job_playlists, as: :has_many, through: :playlist_jobs
end
end
end
Expand Down
17 changes: 0 additions & 17 deletions app/avo/resources/job_playlist.rb

This file was deleted.

18 changes: 0 additions & 18 deletions app/avo/resources/playlist_job.rb

This file was deleted.

6 changes: 0 additions & 6 deletions app/controllers/avo/job_playlists_controller.rb

This file was deleted.

6 changes: 0 additions & 6 deletions app/controllers/avo/playlist_jobs_controller.rb

This file was deleted.

8 changes: 7 additions & 1 deletion app/controllers/companies_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def set_company
end

def filter_jobs
@jobs = JobFilteringService.new(@jobs, filter_params).filter_by_department
@jobs = JobFilter.new(filter_params, @jobs).filter_by_department
end

def set_jobs_and_departments
Expand All @@ -30,6 +30,12 @@ def set_departments
@departments = @jobs.pluck(:department).compact.uniq
end

# TODO: Implement company_params
# def company_params
# params.require(:company).permit(:name, :description)
# end

# TODO: Fix this as at the moment :id isn't a permitted param
def filter_params
params.permit(:department)
end
Expand Down
Loading

0 comments on commit 8864c74

Please sign in to comment.