review: readability

This commit is contained in:
sebastiencarceles 2023-01-16 15:47:22 +01:00
parent 39545671f3
commit 0e3126cf83

View file

@ -3,6 +3,10 @@ class Champs::RNAController < ApplicationController
def show
@champ = policy_scope(Champ).find(params[:champ_id])
@error = @champ.association_fetch_error_key unless @champ.fetch_association!(read_param_value(@champ.input_name, 'value'))
rna = read_param_value(@champ.input_name, 'value')
unless @champ.fetch_association!(rna)
@error = @champ.association_fetch_error_key
end
end
end