diff --git a/db/migrate/20130717104359_migrate_activity_stream_to_status_message.rb b/db/migrate/20130717104359_migrate_activity_stream_to_status_message.rb index b993babd2..c02282f81 100644 --- a/db/migrate/20130717104359_migrate_activity_stream_to_status_message.rb +++ b/db/migrate/20130717104359_migrate_activity_stream_to_status_message.rb @@ -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} ![](#{p.image_url})", :type => "StatusMessage", without_protection: true) + p.update_attributes({text: "#{p.text} ![](#{p.image_url})", type: "StatusMessage"}, without_protection: true) end end