class MessagesController < ApplicationController skip_before_action :verify_authenticity_token def create @message = Message.create(message_params) render json: {}, status: :created end private def message_params params.permit(:title, :phone, :description, :email, :name) end end