Refactor some complex code

This commit is contained in:
gregoirenovel 2018-01-25 09:39:19 +01:00
parent 2da724d681
commit f306dd636e
3 changed files with 3 additions and 5 deletions

View file

@ -1,3 +1,3 @@
.row.white-back
#previsualisation
= render 'users/description/show'
= render partial: 'users/description/show', locals: { previsualisation: true }

View file

@ -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.

View file

@ -1 +1 @@
= render partial: 'show'
= render partial: 'show', locals: { previsualisation: false }