diff --git a/app/controllers/new_user/feedbacks_controller.rb b/app/controllers/new_user/feedbacks_controller.rb index e3b952b91..d7db41189 100644 --- a/app/controllers/new_user/feedbacks_controller.rb +++ b/app/controllers/new_user/feedbacks_controller.rb @@ -1,6 +1,6 @@ class NewUser::FeedbacksController < ApplicationController def create - current_user.feedbacks.create!(mark: params[:mark]) + current_user.feedbacks.create!(rating: params[:rating]) flash.notice = "Merci de votre retour, si vous souhaitez nous en dire plus, n'hésitez pas à nous contacter par email." end end diff --git a/app/views/new_user/dossiers/index.html.haml b/app/views/new_user/dossiers/index.html.haml index dcd145289..aecf834f0 100644 --- a/app/views/new_user/dossiers/index.html.haml +++ b/app/views/new_user/dossiers/index.html.haml @@ -58,11 +58,11 @@ #user-satisfaction %h3 Que pensez-vous de la facilité d'utilisation de ce service ? .icons - = link_to feedback_path(mark: 0), data: { remote: true, method: :post } do + = link_to feedback_path(rating: Feedback.ratings.fetch(:unhappy)), data: { remote: true, method: :post } do %span.icon.frown - = link_to feedback_path(mark: 1), data: { remote: true, method: :post } do + = link_to feedback_path(rating: Feedback.ratings.fetch(:neutral)), data: { remote: true, method: :post } do %span.icon.meh - = link_to feedback_path(mark: 2), data: { remote: true, method: :post } do + = link_to feedback_path(rating: Feedback.ratings.fetch(:happy)), data: { remote: true, method: :post } do %span.icon.smile - else