Merge pull request #2542 from betagouv/fix-feedbacks

FeedbacksController should inherit from UserController
This commit is contained in:
gregoirenovel 2018-09-11 10:17:31 +02:00 committed by GitHub
commit 02a8693f7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,8 @@
class NewUser::FeedbacksController < ApplicationController
module NewUser
class FeedbacksController < UserController
def create
current_user.feedbacks.create!(rating: params[:rating])
flash.notice = "Merci de votre retour, si vous souhaitez nous en dire plus, n'hésitez pas à #{view_context.contact_link('nous contacter', type: Helpscout::FormAdapter::TYPE_AMELIORATION)}."
end
end
end