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:
parent
34649b92ad
commit
4759cb4f43
@ -5,7 +5,7 @@ class ContactsController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
@contact = Contact.new(permitted_params)
|
@contact = Contact.new(params[:contact])
|
||||||
if @contact.save
|
if @contact.save
|
||||||
redirect_to(:new_contact, :notice => t("contact.thanks"))
|
redirect_to(:new_contact, :notice => t("contact.thanks"))
|
||||||
else
|
else
|
||||||
@ -13,10 +13,4 @@ class ContactsController < ApplicationController
|
|||||||
render :new
|
render :new
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def permitted_params
|
|
||||||
params.require(:contact).permit(:id, :email, :subject, :name, :message)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user