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
|
||||
|
||||
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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user