You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
519 B

class HomeController < ApplicationController
skip_before_action :verify_authenticity_token
def index; end
def create
puts '***************************** Inside home controller *****************************************'
flash.now[:success] = 'Message sent!'
@contact = Contact.new(params[:contact])
@contact.request = request
if @contact.deliver
flash.now[:success] = 'Message sent!'
else
flash.now[:error] = 'Could not send message'
end
render :index
end
end