Create feedbacks with ratings instead of marks
This commit is contained in:
parent
e9a262947f
commit
3ba4ce0d37
2 changed files with 4 additions and 4 deletions
|
@ -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 à <a href='mailto:#{CONTACT_EMAIL}' target='_blank'>nous contacter par email</a>."
|
||||
end
|
||||
end
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue