Sha256: 2d811b038d71b58d1a4338814d6f27289f86b6e082c4362342af87748c968f6d
Contents?: true
Size: 862 Bytes
Versions: 112
Compression:
Stored size: 862 Bytes
Contents
def puts! a, b="" puts "+++ +++ #{b}" puts a.inspect end task :migrate => [ 'migrate:assign_galleries_to_profile' ] namespace :migrate do desc 'assign galleries to profile' task :assign_galleries_to_profile => :environment do u = User.find_by :email => 'piousbox@gmail.com' Gallery.unscoped.where( :user_profile => nil ).update_all( :user_profile_id => u.profile.id ) puts 'Each gallery is associated with a user profile.' end desc 'destination for every marker' task :markers_destinations => :environment do ms = Marker.where( destination: nil ) ms.each do |m| d = Map.where( slug: m.slug ).first if d m.destination = d m.save puts "Marker |#{m.name}| got destination |#{m.slug}|." else puts "+++ +++ #{m.slug}, No destination for this one." end end end end
Version data entries
112 entries across 112 versions & 1 rubygems