Sha256: e84ba50cc3d81e68525f2a298d25c414733a3d7d4325fe06a1f552c10fb4cea5
Contents?: true
Size: 421 Bytes
Versions: 2
Compression:
Stored size: 421 Bytes
Contents
module Chatroom class MessagesController < ApplicationController # GET /messages def index @messages = Message.all end # POST /messages # POST /messages.json def create @message = Message.create!(message_params) end private # Never trust parameters from the scary internet, only allow the white list through. def message_params params.require(:message).permit(:content) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
chatroom-0.0.9 | app/controllers/chatroom/messages_controller.rb |
chatroom-0.0.8 | app/controllers/chatroom/messages_controller.rb |