require_dependency "phcdevworks_mailer_form/application_controller" module PhcdevworksMailerForm class Website::PagesController < ApplicationController # Page - Form - Contact def contact @contact = FormMailers.new end # Send Contact Email def create @contact = FormMailers.new(params[:form_mailers]) @contact.request = request if @contact.deliver redirect_to contact_us_path, :flash => { :success => 'Thank You Message Sent!' } else flash.now[:error] = 'Error Message Didnt Send!' render :contact end end end end