Apply manual rubocop fixes

This commit is contained in:
Sebastian Serth
2021-05-14 11:07:11 +02:00
parent 6cbecb5b39
commit da0a682ffb
109 changed files with 431 additions and 416 deletions

View File

@ -20,7 +20,7 @@ Rails.application.configure do
# Enable/disable caching. By default caching is disabled.
# Run rails dev:cache to toggle caching.
if Rails.root.join('tmp', 'caching-dev.txt').exist?
if Rails.root.join('tmp/caching-dev.txt').exist?
config.action_controller.perform_caching = true
config.action_controller.enable_fragment_cache_logging = true

View File

@ -3,15 +3,7 @@
unless Array.respond_to?(:average)
class Array
def average
inject(:+) / length if present?
end
end
end
unless Array.respond_to?(:to_h)
class Array
def to_h
to_h
sum / length if present?
end
end
end

View File

@ -723,11 +723,11 @@ de:
Mit "Kommentar abschicken" wird der Kommentar dann gesichert und taucht als Sprechblase neben der Zeile auf.
howto_title: 'Anleitung'
index:
get_my_comment_requests: Meine Kommentaranfragen
my_comment_requests: Meine Kommentaranfragen
all: "Alle Kommentaranfragen"
get_rfcs_with_my_comments: Kommentaranfragen die ich kommentiert habe
get_my_rfc_activity: "Meine Kommentaraktivität"
get_rfcs_for_exercise: "Übungsspezifische Kommentare"
rfcs_with_my_comments: Kommentaranfragen die ich kommentiert habe
my_rfc_activity: "Meine Kommentaraktivität"
rfcs_for_exercise: "Übungsspezifische Kommentare"
study_groups:
placeholder: "Lerngruppe"
current: "Aktuelle Lerngruppe"

View File

@ -724,10 +724,10 @@ en:
howto_title: 'How to comment'
index:
all: All Requests for Comments
get_my_comment_requests: My Requests for Comments
get_rfcs_with_my_comments: Requests for Comments I have commented on
get_my_rfc_activity: "My Comment Activity"
get_rfcs_for_exercise: "Exercise Comments"
my_comment_requests: My Requests for Comments
rfcs_with_my_comments: Requests for Comments I have commented on
my_rfc_activity: "My Comment Activity"
rfcs_for_exercise: "Exercise Comments"
study_groups:
placeholder: "Study group"
current: "Current Study Group"

View File

@ -23,9 +23,9 @@ Rails.application.routes.draw do
end
end
resources :comments, defaults: {format: :json}
get '/my_request_for_comments', as: 'my_request_for_comments', to: 'request_for_comments#get_my_comment_requests'
get '/my_rfc_activity', as: 'my_rfc_activity', to: 'request_for_comments#get_rfcs_with_my_comments'
get '/exercises/:exercise_id/request_for_comments', as: 'rfcs_for_exercise', to: 'request_for_comments#get_rfcs_for_exercise'
get '/my_request_for_comments', as: 'my_request_for_comments', to: 'request_for_comments#my_comment_requests'
get '/my_rfc_activity', as: 'my_rfc_activity', to: 'request_for_comments#rfcs_with_my_comments'
get '/exercises/:exercise_id/request_for_comments', as: 'rfcs_for_exercise', to: 'request_for_comments#rfcs_for_exercise'
delete '/comment_by_id', to: 'comments#destroy_by_id'
put '/comments', to: 'comments#update', defaults: {format: :json}