Sha256: d4bd06780732283dafc61889f24a433497a9f6ab5ab51b378cd89765129c07c8
Contents?: true
Size: 690 Bytes
Versions: 2
Compression:
Stored size: 690 Bytes
Contents
module Incline class ContactController < ApplicationController allow_anon true ## # GET /incline/contact def new @msg = Incline::ContactMessage.new end ## # POST /incline/contact def create @msg = get_message if @msg.valid? @msg.remote_ip = request.remote_ip @msg.send_message flash[:success] = 'Your message has been sent.' redirect_to root_url else render 'new' end end private def get_message p = params.require(:contact_message).permit(:your_name, :your_email, :related_to, :subject, :body, :recaptcha) Incline::ContactMessage.new(p) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
incline-0.1.7 | app/controllers/incline/contact_controller.rb |
incline-0.1.5 | app/controllers/incline/contact_controller.rb |