refacto: better error management
This commit is contained in:
parent
e89c8385a4
commit
39545671f3
7 changed files with 51 additions and 33 deletions
|
@ -3,7 +3,6 @@ class Champs::RNAController < ApplicationController
|
|||
|
||||
def show
|
||||
@champ = policy_scope(Champ).find(params[:champ_id])
|
||||
@rna = read_param_value(@champ.input_name, 'value')
|
||||
@network_error = @champ.fetch_association!(@rna).present?
|
||||
@error = @champ.association_fetch_error_key unless @champ.fetch_association!(read_param_value(@champ.input_name, 'value'))
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue