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.
21 lines
392 B
21 lines
392 B
class ContactsController < ApplicationController
|
|
def index
|
|
@contact = Contact.new
|
|
end
|
|
|
|
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
|