mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-17 13:44:09 +00:00
Introduce strong parameters
This commit is contained in:
parent
38bc2e3c3a
commit
355ecc0ac6
93 changed files with 172 additions and 241 deletions
|
|
@ -45,22 +45,17 @@ module Admin
|
|||
end
|
||||
end
|
||||
|
||||
protected
|
||||
private
|
||||
|
||||
def set_user
|
||||
@user = User.find_by(id: @registration.user_id)
|
||||
end
|
||||
|
||||
def registration_params
|
||||
params.require(:registration).
|
||||
permit(
|
||||
:conference_id, :arrival, :departure,
|
||||
:volunteer,
|
||||
vchoice_ids: [], qanswer_ids: [], event_ids: [],
|
||||
qanswers_attributes: [],
|
||||
user_attributes: [
|
||||
:id, :name, :tshirt, :mobile, :volunteer_experience, :languages,
|
||||
:nickname, :affiliation])
|
||||
params.require(:registration).permit(:user_id, :conference_id, :arrival, :departure, :attended,
|
||||
:volunteer, :other_special_needs,
|
||||
vchoice_ids: [], qanswer_ids: [], qanswers_attributes: [], event_ids: [],
|
||||
user_attributes: [:nickname, :name, :affiliation, :tshirt, :mobile, :volunteer_experience, :languages])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue