Created
July 26, 2013 17:58
-
-
Save maasdesigner/6090872 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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