Skip to content

Commit

Permalink
fixed user_params and added visible_event_types to view
Browse files Browse the repository at this point in the history
  • Loading branch information
tiffanylamm committed Apr 28, 2024
1 parent f514259 commit e59375c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/controllers/proposals_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,6 @@ def event_params
end

def user_params
params.require(:user).permit(:email, :password, :password_confirmation, :username, :is_admin)
params.require(:user).permit(:email, :password, :password_confirmation, :username)
end
end
6 changes: 2 additions & 4 deletions app/views/proposals/_submission_type_content_form.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@

.form-group
= f.label :event_type_id, "Type"
- if current_user&.is_admin
= f.select :event_type_id, event_type_select_options(@conference.program.event_types), { include_blank: false }, { class: 'select-help-toggle form-control' }
- else
= f.select :event_type_id, event_type_select_options(@conference.program.event_types.available_for_public), { include_blank: false }, { class: 'select-help-toggle form-control' }
- visible_event_types = current_user&.is_admin ? @conference.program.event_types : @conference.program.event_types.available_for_public
= f.select :event_type_id, event_type_select_options(visible_event_types), { include_blank: false }, { class: 'select-help-toggle form-control' }

- program.event_types.each do |event_type|
.help-block.event_event_type_id.collapse{ id: "#{dom_id(event_type)}-help" }
Expand Down

0 comments on commit e59375c

Please sign in to comment.