Sha256: 327258e68588222353c894b320cd6cd7209114183991acddd3e3b7c7bbef5b1e
Contents?: true
Size: 759 Bytes
Versions: 26
Compression:
Stored size: 759 Bytes
Contents
module Renalware module System class UserFeedbackController < BaseController def new feedback = UserFeedback.new authorize feedback render_new(feedback) end def create feedback = UserFeedback.new(user_feedback_params) feedback.author = current_user authorize feedback if feedback.save redirect_to root_url, notice: "Feedback registered, thank you" else render_new(feedback) end end private def render_new(feedback) render :new, locals: { feedback: feedback } end def user_feedback_params params .require(:feedback) .permit(:comment, :category) end end end end
Version data entries
26 entries across 26 versions & 1 rubygems