blob: 26db31e623ef59086762928384ddee4afda4b38d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# app/controllers/help_controller.rb:
# Show information about one particular request.
#
# Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
# $Id: help_controller.rb,v 1.2 2008-02-19 17:41:58 francis Exp $
class HelpController < ApplicationController
def about
end
def contact
if params[:submitted_contact_form]
@contact = ContactValidator.new(params[:contact])
if @contact.valid?
ContactMailer.deliver_message(
params[:contact][:name],
params[:contact][:email],
params[:contact][:subject],
params[:contact][:message],
"IP #{request.env['REMOTE_HOST']}"
)
flash[:notice] = "Your message has been sent. Thank you for getting in touch! We'll get back to you soon."
redirect_to home_url
return
end
end
end
end
|