review: readability
This commit is contained in:
parent
39545671f3
commit
0e3126cf83
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue