Commit b0958d50 authored by Mario Manno's avatar Mario Manno

fix missing strong param for avatars

parent 95a3abb8
......@@ -26,6 +26,6 @@ class AvailabilitiesController < ApplicationController
end
def person_params
params.require(:person).permit(:first_name, :last_name, :public_name, :email, :email_public, :gender, :avatar_file_name, :abstract, :description, :include_in_mailings, availabilities_attributes: %i(id start_date end_date conference_id day_id))
params.require(:person).permit(:first_name, :last_name, :public_name, :email, :email_public, :gender, :avatar, :abstract, :description, :include_in_mailings, availabilities_attributes: %i(id start_date end_date conference_id day_id))
end
end
......@@ -25,7 +25,7 @@ class Cfp::AvailabilitiesController < ApplicationController
private
def person_params
params.require(:person).permit(:first_name, :last_name, :public_name, :email, :email_public, :gender, :avatar_file_name, :abstract, :description, :include_in_mailings, availabilities_attributes: %i(id start_date end_date conference_id day_id))
params.require(:person).permit(:first_name, :last_name, :public_name, :email, :email_public, :gender, :avatar, :abstract, :description, :include_in_mailings, availabilities_attributes: %i(id start_date end_date conference_id day_id))
end
end
......@@ -164,7 +164,7 @@ class PeopleController < ApplicationController
def person_params
params.require(:person).permit(
:first_name, :last_name, :public_name, :email, :email_public, :gender, :avatar_file_name, :abstract, :description, :include_in_mailings, :note,
:first_name, :last_name, :public_name, :email, :email_public, :gender, :avatar, :abstract, :description, :include_in_mailings, :note,
im_accounts_attributes: %i(id im_type im_address _destroy),
languages_attributes: %i(id code _destroy),
links_attributes: %i(id title url _destroy),
......
......@@ -8,7 +8,7 @@ class PeopleControllerTest < ActionController::TestCase
end
def person_params
@person.attributes.except(*%w(id avatar_content_type avatar_file_size avatar_updated_at created_at updated_at user_id))
@person.attributes.except(*%w(id avatar_content_type avatar_file_size avatar_updated_at avatar_file_name created_at updated_at user_id))
end
test "should get index" do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment