Skip to content

Commit

Permalink
Use String#tr instead of String#gsub
Browse files Browse the repository at this point in the history
  • Loading branch information
raccube committed Jan 5, 2022
1 parent 023b642 commit ac92a8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/services_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def create

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
Expand Down

0 comments on commit ac92a8b

Please sign in to comment.