Sha256: 7422cf573f5602548543f8d14edf2d3ae516755bfebbd44076e30a84f0323d90
Contents?: true
Size: 725 Bytes
Versions: 8
Compression:
Stored size: 725 Bytes
Contents
module C80FeedbackForm class MessController < ApplicationController # skip_before_filter :verify_authenticity_token def handle_message_feedback puts "<MessController.handle_message_feedback>" m = MessageFeedback.new(mess_params) respond_to do |format| if m.save format.js MessageFeedbackMailer.send_mess(m, "Сообщение с сайта").deliver else puts "<MessController.handle_message_feedback> errors: #{m.errors}" format.js { render json: m.errors, status: :unprocessable_entity } end end end def mess_params params.require(:mess).permit(:name, :email_or_phone, :comment, :kapcha) end end end
Version data entries
8 entries across 8 versions & 1 rubygems