Apply Rails/SafeNavigation rubocop rule

This commit is contained in:
Javi Martín
2019-06-22 23:00:33 +02:00
parent daa86ca3fc
commit 9fe8c47528
39 changed files with 52 additions and 53 deletions

View File

@@ -21,7 +21,7 @@ class Admin::Poll::QuestionsController < Admin::Poll::BaseController
end
def create
@question.author = @question.proposal.try(:author) || current_user
@question.author = @question.proposal&.author || current_user
@question.votation_type = VotationType.build_by_type(@question, params[:votation_type])
if @question.save