Browse Source

Rubocop

pull/77/head
baarkerlounger 4 years ago
parent
commit
4e56c2ccfe
  1. 8
      Gemfile.lock
  2. 2
      app/controllers/case_logs_controller.rb

8
Gemfile.lock

@ -1,6 +1,6 @@
GIT GIT
remote: https://github.com/rspec/rspec-core.git remote: https://github.com/rspec/rspec-core.git
revision: d57c371ee92b16211b80ac7b0b025968438f5297 revision: 42a9fe3a2dc9d5e68811ee646f4b9b4349c18b24
branch: main branch: main
specs: specs:
rspec-core (3.11.0.pre) rspec-core (3.11.0.pre)
@ -40,7 +40,7 @@ GIT
GIT GIT
remote: https://github.com/rspec/rspec-support.git remote: https://github.com/rspec/rspec-support.git
revision: 2a17194b9fc868a4b4a41d7168103dca825c3004 revision: 9499cb622f9feef43a53f357809f9e656e7cb6de
branch: main branch: main
specs: specs:
rspec-support (3.11.0.pre) rspec-support (3.11.0.pre)
@ -182,7 +182,7 @@ GEM
rails (>= 6.0.0) rails (>= 6.0.0)
stimulus-rails stimulus-rails
turbo-rails turbo-rails
i18n (1.8.10) i18n (1.8.11)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
inherited_resources (1.13.0) inherited_resources (1.13.0)
actionpack (>= 5.2, < 6.2) actionpack (>= 5.2, < 6.2)
@ -309,7 +309,7 @@ GEM
rubocop-rails (= 2.12.2) rubocop-rails (= 2.12.2)
rubocop-rake (= 0.6.0) rubocop-rake (= 0.6.0)
rubocop-rspec (= 2.4.0) rubocop-rspec (= 2.4.0)
rubocop-performance (1.11.5) rubocop-performance (1.12.0)
rubocop (>= 1.7.0, < 2.0) rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0) rubocop-ast (>= 0.4.0)
rubocop-rails (2.12.2) rubocop-rails (2.12.2)

2
app/controllers/case_logs_controller.rb

@ -105,7 +105,7 @@ private
question_params = params["case_log"][question_key] question_params = params["case_log"][question_key]
next unless question_params next unless question_params
if ["checkbox", "validation_override"].include?(question_info["type"]) if %w[checkbox validation_override].include?(question_info["type"])
question_info["answer_options"].keys.reject { |x| x.match(/divider/) }.each do |option| question_info["answer_options"].keys.reject { |x| x.match(/divider/) }.each do |option|
result[option] = question_params.include?(option) result[option] = question_params.include?(option)
end end

Loading…
Cancel
Save