1
0
mirror of https://github.com/danbee/danbarberphoto synced 2025-03-04 08:49:07 +00:00

Remove permitted params on contact controller.

This commit is contained in:
Dan Barber 2014-03-05 17:45:46 +00:00
parent 34649b92ad
commit 4759cb4f43

View File

@ -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