Class: Contact::MessagesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/contact/messages_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



12
13
14
15
16
# File 'app/controllers/contact/messages_controller.rb', line 12

def create
  @message = Message.new(params[:message])
  MessageMailer.new_message(@message).deliver if @message.valid?
  respond_with json: @message
end

#newObject



8
9
10
# File 'app/controllers/contact/messages_controller.rb', line 8

def new
  @message = Message.new
end