From 0fc42542674ce5a8a0cc41cd1a38a1e6915acbab Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Sat, 27 Dec 2025 01:35:22 +0900 Subject: [PATCH] Unused controller Staff::ProfilesController --- app/controllers/staff/profiles_controller.rb | 25 ----------- app/views/staff/profiles/edit.html.haml | 46 -------------------- 2 files changed, 71 deletions(-) delete mode 100644 app/controllers/staff/profiles_controller.rb delete mode 100644 app/views/staff/profiles/edit.html.haml diff --git a/app/controllers/staff/profiles_controller.rb b/app/controllers/staff/profiles_controller.rb deleted file mode 100644 index d8744b7e0..000000000 --- a/app/controllers/staff/profiles_controller.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Staff::ProfilesController < Staff::ApplicationController - def edit - @user = Speaker.find(params[:id]).user - end - - def update - @user = Speaker.find(params[:id]).user - if @user.update(user_params) - redirect_to event_staff_program_speakers_url(event) - else - if @user.email == "" - @user.errors[:email].clear - @user.errors[:email] = " can't be blank" - end - flash.now[:danger] = "Unable to save profile. Please correct the following: #{@user.errors.full_messages.join(', ')}." - render :edit - end - end - - private - - def user_params - params.require(:user).permit(:bio, :gender, :ethnicity, :country, :name, :email) - end -end diff --git a/app/views/staff/profiles/edit.html.haml b/app/views/staff/profiles/edit.html.haml deleted file mode 100644 index f09a84e90..000000000 --- a/app/views/staff/profiles/edit.html.haml +++ /dev/null @@ -1,46 +0,0 @@ -.row - .col-md-12 - %header.page-header - %h1 - Edit #{@user.name}'s Profile - -= form_for @user, url: edit_profile_event_staff_speaker_path, html: {role: 'form'} do |f| - .row - %fieldset.col-md-6 - .widget - .widget-header - %i.bi.bi-person - %h3 #{@user.name}'s Profile - .widget-content - %p - This information will be - %strong hidden - from the review committee, but will be shown on the program if the proposal is accepted. - .form-group - = f.label :name - = f.text_field :name, class: 'form-control', placeholder: 'Your name' - %p - = f.label :bio - = f.text_area :bio, class: 'form-control', placeholder: 'Enter your bio', rows: 7, maxlength: 500 - %p.help-block Bio is limited to 500 characters. - - %fieldset.col-md-6 - .widget - .widget-header - %i.bi.bi-envelope-fill - %h3 Identity Services - .widget-content - %p - Email is only used for notifications on proposal feedback and acceptance into the program. - .form-group - = f.label :email - = f.email_field :email, class: 'form-control', placeholder: 'Your email address' - .service - - if current_user.provider.present? - %button.btn.btn-success.disabled - %i{class: "icon-#{current_user.provider.downcase}"} - | Connected via - = current_user.provider - - .row.col-md-12.form-submit - %button.float-end.btn.btn-success{:type => "submit"} Save