Commit 20ed6a34 authored by Mario Manno's avatar Mario Manno

add missing strong param for admin controllers

parent de84368e
......@@ -14,7 +14,7 @@ class AvailabilitiesController < ApplicationController
end
def update
@person.update_attributes_from_slider_form(params[:person])
@person.update_attributes_from_slider_form(person_params)
redirect_to(person_url(@person), notice: 'Availibility was successfully updated.')
end
......@@ -25,4 +25,7 @@ class AvailabilitiesController < ApplicationController
authorize! :create, @person
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))
end
end
......@@ -226,6 +226,7 @@ class EventsController < ApplicationController
def event_params
params.require(:event).permit(
:id, :title, :subtitle, :event_type, :time_slots, :state, :start_time, :public, :language, :abstract, :description, :logo, :track_id, :room_id, :note, :submission_note, :do_not_record, :recording_license,
event_attachments_attributes: %i(id title public _destroy),
ticket_attributes: %i(id remote_ticket_id),
links_attributes: %i(id title url _destroy)
)
......
......@@ -155,7 +155,13 @@ class PeopleController < 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, :note)
params.require(:person).permit(
:first_name, :last_name, :public_name, :email, :email_public, :gender, :avatar_file_name, :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),
phone_numbers_attributes: %i(id phone_type phone_number _destroy)
)
end
end
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