File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -34,13 +34,13 @@ class Badge < ActiveRecord::Base
34
34
class << self
35
35
def rename ( old_class_name , new_class_name )
36
36
Badge . where ( badge_class_name : old_class_name ) . map { |badge | badge . update_attribute ( :badge_class_name , new_class_name ) }
37
- Fact . where ( " metadata LIKE ' %#{ old_class_name } %' ") . each do |fact |
37
+ Fact . where ( ' metadata LIKE ?' , " %#{ old_class_name } %") . each do |fact |
38
38
if fact . metadata [ :award ] == old_class_name
39
39
fact . metadata [ :award ] = new_class_name
40
40
end
41
41
fact . save
42
42
end
43
- ApiAccess . where ( " awards LIKE ' %#{ old_class_name } %' ") . each do |api_access |
43
+ ApiAccess . where ( ' awards LIKE ?' , " %#{ old_class_name } %") . each do |api_access |
44
44
if api_access . awards . delete ( old_class_name )
45
45
api_access . awards << new_class_name
46
46
end
Original file line number Diff line number Diff line change @@ -71,5 +71,5 @@ namespace :protips do
71
71
end
72
72
73
73
def slideshare_facts
74
- ( Fact . where ( " tags LIKE ' % slideshare%'" ) ) . uniq
74
+ ( Fact . where ( ' tags LIKE ?' , ' % slideshare%') ) . uniq
75
75
end
You can’t perform that action at this time.
0 commit comments