diff --git a/app/controllers/exchanges/broker_applicants_controller.rb b/app/controllers/exchanges/broker_applicants_controller.rb index ecfda628f54..50df9bdfc52 100644 --- a/app/controllers/exchanges/broker_applicants_controller.rb +++ b/app/controllers/exchanges/broker_applicants_controller.rb @@ -38,7 +38,7 @@ def edit def update broker_role = @broker_applicant.broker_role - broker_role.update_attributes(reason: params.require(:person).require(:broker_role_attributes).permit(:reason)) if params.dig(:person, :broker_role_attributes, :reason).present? + broker_role.update_attributes(reason: params.require(:person).require(:broker_role_attributes).permit(:reason)[:reason]) if params.dig(:person, :broker_role_attributes, :reason).present? # TODO: This params['deny'] stuff might have to be changed to params['commit']['action_name'] if params['deny'] broker_role.deny! diff --git a/app/views/shared/brokers/_broker_fields.html.erb b/app/views/shared/brokers/_broker_fields.html.erb index a306e3d9e8a..354f0685d66 100644 --- a/app/views/shared/brokers/_broker_fields.html.erb +++ b/app/views/shared/brokers/_broker_fields.html.erb @@ -39,7 +39,7 @@
<%= f.fields_for :broker_role do |broker_role_fields| %> - <% disabled = (broker_or_staff_role.active? || broker_or_staff_role.agency_pending?) ? true : false %> + <% disabled = broker_or_staff_role.active? ? true : false %>