Skip to content

Commit 07804ba

Browse files
committed
Patched hole in the opportunities controller for the tags passing through with whitespace and causing rocket tag errors
1 parent 02ad051 commit 07804ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/controllers/opportunities_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ def header_ok
124124

125125
def cleanup_params_to_prevent_rocket_tag_error
126126
if params[:opportunity] && params[:opportunity][:tags]
127-
params[:opportunity][:tags] = params[:opportunity][:tags].split(",").compact.join(",")
128-
params[:opportunity][:tags] = nil if params[:opportunity][:tags].blank?
127+
params[:opportunity][:tags] = "#{params[:opportunity][:tags]}".split(',').map(&:strip).reject(&:empty?).join(",")
128+
params[:opportunity][:tags] = nil if params[:opportunity][:tags].strip.blank?
129129
end
130130
end
131131

0 commit comments

Comments
 (0)