# File lib/facebooker/rails/utilities.rb, line 5 def refresh_all_images(session) Dir.glob(File.join(RAILS_ROOT,"public","images","*.{png,jpg,gif}")).each do |img| refresh_image(session,img) end end
# File lib/facebooker/rails/utilities.rb, line 11 def refresh_image(session,full_path) basename=File.basename(full_path) base_path=ActionController::Base.asset_host base_path += "/" unless base_path.ends_with?("/") image_path=base_path+"images/#{basename}" puts "refreshing: #{image_path}" session.server_cache.refresh_img_src(image_path) end