5 def refresh_all_images(session)
6 Dir.glob(File.join(RAILS_ROOT,"public","images","*.{png,jpg,gif}")).each do |img|
7 refresh_image(session,img)
11 def refresh_image(session,full_path)
12 basename=File.basename(full_path)
13 base_path=ActionController::Base.asset_host
14 base_path += "/" unless base_path.ends_with?("/")
15 image_path=base_path+"images/#{basename}"
16 puts "refreshing: #{image_path}"
17 session.server_cache.refresh_img_src(image_path)