Skip to content
Snippets Groups Projects
Commit 5dc77d75 authored by James Lopez's avatar James Lopez
Browse files

refactored migration based on feedback

parent 7b868c61
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -61,7 +61,7 @@ class RemoveDotAtomPathEndingOfProjects < ActiveRecord::Migration
private
 
def clean_path(project_path)
execute "UPDATE projects SET path = '#{project_path.clean_path}' WHERE id = #{project_path.id}"
execute "UPDATE projects SET path = #{sanitize(project_path.clean_path)} WHERE id = #{project_path.id}"
end
 
def rename_project_repo(project_path)
Loading
Loading
@@ -73,4 +73,8 @@ class RemoveDotAtomPathEndingOfProjects < ActiveRecord::Migration
rescue
false
end
def sanitize(value)
ActiveRecord::Base.connection.quote(value)
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment