Sha256: 8f8ef01fead7c6df139118a7e6031521f331957af00506fe628a86117fbb6015

Contents?: true

Size: 204 Bytes

Versions: 16

Compression:

Stored size: 204 Bytes

Contents

class PopulateCompletedAtInGoals < ActiveRecord::Migration
  def change
    SocialNetworking::Goal.all.each do |goal|
      goal.update(created_at: goal.updated_at) if goal.is_completed
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
social_networking-0.13.3 db/migrate/20150317174425_populate_completed_at_in_goals.rb
social_networking-0.13.2 db/migrate/20150317174425_populate_completed_at_in_goals.rb
social_networking-0.13.1 db/migrate/20150317174425_populate_completed_at_in_goals.rb
social_networking-0.13.0 db/migrate/20150317174425_populate_completed_at_in_goals.rb
social_networking-0.12.0 db/migrate/20150317174425_populate_completed_at_in_goals.rb
social_networking-0.11.8 db/migrate/20150317174425_populate_completed_at_in_goals.rb
social_networking-0.11.7 db/migrate/20150317174425_populate_completed_at_in_goals.rb
social_networking-0.11.6 db/migrate/20150317174425_populate_completed_at_in_goals.rb
social_networking-0.11.5 db/migrate/20150317174425_populate_completed_at_in_goals.rb
social_networking-0.11.4 db/migrate/20150317174425_populate_completed_at_in_goals.rb
social_networking-0.11.3 db/migrate/20150317174425_populate_completed_at_in_goals.rb
social_networking-0.11.2 db/migrate/20150317174425_populate_completed_at_in_goals.rb
social_networking-0.11.1 db/migrate/20150317174425_populate_completed_at_in_goals.rb
social_networking-0.11.0 db/migrate/20150317174425_populate_completed_at_in_goals.rb
social_networking-0.10.0 db/migrate/20150317174425_populate_completed_at_in_goals.rb
social_networking-0.9.3 db/migrate/20150317174425_populate_completed_at_in_goals.rb