Sha256: a662f3b3c40120b8f32453039fe40318d7159a66804f0c468fc13c3f29608b3c
Contents?: true
Size: 725 Bytes
Versions: 51
Compression:
Stored size: 725 Bytes
Contents
def puts! a, b='' puts "+++ +++ #{b}" puts a.inspect end namespace :ish_manager do desc "every user needs a user_profile" task :generate_user_profiles => :environment do User.all.map do |u| unless u.profile p = ::Ish::UserProfile.new :email => u.email, :user => u, :role_name => :guy u.profile = p u.save && p.save && print('.') end end puts 'OK' end desc 'assign my creator_profile to Gameui::Marker where missing' task :gameui_markers_creator_profile => :environment do ms = Gameui::Marker.where( creator_profile_id: nil ) profile = User.find_by( email: 'piousbox@gmail.com' ).profile ms.update_all( creator_profile_id: profile.id ) end end
Version data entries
51 entries across 51 versions & 1 rubygems