Use `String#tr` instead of `String#gsub`

This commit is contained in:
Karina Kwiatek 2022-01-05 20:09:34 +01:00
parent 023b642bc1
commit ac92a8b6bd
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ class ServicesController < ApplicationController
def update
service = current_user.services.find(params[:id])
service.post_tag = params[:service][:post_tag].gsub('@', '')
service.post_tag = params[:service][:post_tag].tr('@', '')
if service.save
flash[:success] = "Service updated successfully"
else