Rake printing instance variable to console


#1

Hello All,

My small issue is that following rake task is printing my instance
variable to console, but I do not want any output accept my “put”
statement.

Data field is a blob and contains binary data and when printed to my
console it is huge amount of data. I dont wanna see it at all.

Any suggestions? Thanks

desc "Migrate images from attachments to fleximage."
task :migrate => [:environment] do |t|
   Asset.find(:all, :conditions=>"parent_id is NULL").each do |a|
     image_file = RAILS_ROOT + "/public" + a.public_name_for
     puts "Working on " + image_file
     i = Image.create(
                   :data => image_file,
                   :author_id   => a.author_id,
                   :author_ip   => a.author_ip
                   )
     ActiveRecord::Base.connection.execute("update images set id =

#{a.id} where id = #{i.id}")
end
end