fix ActivityStreams::Photo migration
This commit is contained in:
parent
2916b8b216
commit
7057f77924
1 changed files with 3 additions and 2 deletions
|
|
@ -1,8 +1,9 @@
|
|||
class MigrateActivityStreamToStatusMessage < ActiveRecord::Migration
|
||||
class Post < ActiveRecord::Base; self.inheritance_column = false; end
|
||||
def up
|
||||
posts_stream_photos = Post.where(:type => 'ActivityStreams::Photo')
|
||||
posts_stream_photos = Post.where(type: 'ActivityStreams::Photo')
|
||||
posts_stream_photos.each do |p|
|
||||
p.update_attributes(:text => "#{p.text} ", :type => "StatusMessage", without_protection: true)
|
||||
p.update_attributes({text: "#{p.text} ", type: "StatusMessage"}, without_protection: true)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue