From 4759cb4f4348fbfb9a6edbd82320098e8de9ad92 Mon Sep 17 00:00:00 2001 From: Dan Barber Date: Wed, 5 Mar 2014 17:45:46 +0000 Subject: [PATCH] Remove permitted params on contact controller. --- app/controllers/contacts_controller.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/controllers/contacts_controller.rb b/app/controllers/contacts_controller.rb index ff114c1..ba724c7 100644 --- a/app/controllers/contacts_controller.rb +++ b/app/controllers/contacts_controller.rb @@ -5,7 +5,7 @@ class ContactsController < ApplicationController end def create - @contact = Contact.new(permitted_params) + @contact = Contact.new(params[:contact]) if @contact.save redirect_to(:new_contact, :notice => t("contact.thanks")) else @@ -13,10 +13,4 @@ class ContactsController < ApplicationController render :new end end - - private - - def permitted_params - params.require(:contact).permit(:id, :email, :subject, :name, :message) - end end