Refactor some complex code
This commit is contained in:
parent
2da724d681
commit
f306dd636e
3 changed files with 3 additions and 5 deletions
|
@ -1,3 +1,3 @@
|
|||
.row.white-back
|
||||
#previsualisation
|
||||
= render 'users/description/show'
|
||||
= render partial: 'users/description/show', locals: { previsualisation: true }
|
||||
|
|
|
@ -30,9 +30,7 @@
|
|||
.col-lg-8
|
||||
= render partial: 'users/description/pieces_justificatives', locals: { dossier: @dossier }
|
||||
|
||||
-# WTF ?
|
||||
- route = Rails.application.routes.recognize_path(request.referrer)
|
||||
- if !route[:controller].match('admin')
|
||||
- if !previsualisation
|
||||
%div{ style: 'text-align: right;' }
|
||||
%h6 Tous les champs portant un * sont obligatoires.
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
= render partial: 'show'
|
||||
= render partial: 'show', locals: { previsualisation: false }
|
||||
|
|
Loading…
Reference in a new issue