Skip to content

Instantly share code, notes, and snippets.

@maasdesigner
Created July 26, 2013 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maasdesigner/6090872 to your computer and use it in GitHub Desktop.
Save maasdesigner/6090872 to your computer and use it in GitHub Desktop.
class PageController < ApplicationController
def home
end
def about
end
def works
end
def clients
end
def contact
@message = Message.new
end
def create
@message = Message.new(params[:message])
if @message.valid?
NotificationsMailer.new_message(@message).deliver
redirect_to(root_path, :notice => "Message was successfully sent.")
else
flash.now.alert = "Please fill all fields."
render :new
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment