mirror of
https://github.com/edcommonwealth/ecp.org.git
synced 2026-03-07 13:38:13 -08:00
16 lines
346 B
Ruby
16 lines
346 B
Ruby
class ContactsController < ApplicationController
|
|
def new
|
|
@contact = Contact.new
|
|
end
|
|
|
|
def create
|
|
@contact = Contact.new(params[:contact])
|
|
@contact.request = request
|
|
if @contact.deliver
|
|
flash.now[:success] = 'Message sent!'
|
|
else
|
|
flash.now[:error] = 'Could not send message'
|
|
render :new
|
|
end
|
|
end
|
|
end
|