Verified Commit 4b9b47f9 authored by Kaspar Vollenweider's avatar Kaspar Vollenweider 👻
Browse files

rename action from update_waive_and_iban to update_bank_details

parent 120c49c9
......@@ -8,7 +8,7 @@ $(() => {
data: { volunteer: { [fieldName]: valueOrChecked($(target)) } },
method: 'PATCH',
dataType: 'json',
url: Routes.update_waive_and_iban_volunteer_path(volunteerId)
url: Routes.update_bank_details_volunteer_path(volunteerId)
class VolunteersController < ApplicationController
before_action :set_volunteer, only: [:show, :edit, :update, :terminate, :account, :update_waive_and_iban]
before_action :set_volunteer, only: [:show, :edit, :update, :terminate, :account, :update_bank_details]
def index
authorize Volunteer
......@@ -79,7 +79,7 @@ class VolunteersController < ApplicationController
def update_waive_and_iban
def update_bank_details
authorize @volunteer
@volunteer.update(volunteer_params.slice(:iban, :waive, :bank))
render json: nil, status: :ok
......@@ -45,7 +45,7 @@ class VolunteerPolicy < ApplicationPolicy
alias_method :show?, :volunteer_managing_or_volunteers_profile?
alias_method :edit?, :volunteer_managing_or_volunteers_profile?
alias_method :update?, :volunteer_managing_or_volunteers_profile?
alias_method :update_waive_and_iban?, :volunteer_managing_or_volunteers_profile?
alias_method :update_bank_details?, :volunteer_managing_or_volunteers_profile?
alias_method :account?, :superadmin?
# supplementary policies
......@@ -103,7 +103,7 @@ Rails.application.routes.draw do
put :account, on: :member
get :find_client, on: :member, to: 'assignments#find_client'
get :seeking_clients, on: :collection
patch :update_waive_and_iban, on: :member
patch :update_bank_details, on: :member
resources :assignments, except: [:destroy], concerns: [:assignment_feedbacks, :hours_resources]
resources :billing_expenses, only: [:index]
Supports Markdown
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