Class: Hyalin::MessagesController

Inherits:
HyalinController show all
Defined in:
app/controllers/hyalin/messages_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject

POST /messages POST /messages.json



16
17
18
19
20
# File 'app/controllers/hyalin/messages_controller.rb', line 16

def create
  @message = Message.new params[:message]
  @message.save
  respond_with @message, location: after_send_path, notice: t('hyalin.messages.sent_success')
end

#newObject

GET /message/new GET /message/new.json



9
10
11
12
# File 'app/controllers/hyalin/messages_controller.rb', line 9

def new
  @message = Message.new
  respond_with @message
end