Sha256: c0d28a1eccf7adcc583fbbd187b42044a35dfd43207bfd203a644aa6d7073693
Contents?: true
Size: 675 Bytes
Versions: 139
Compression:
Stored size: 675 Bytes
Contents
module Facebooker module Rails class Utilities class << self 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 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 end end end end
Version data entries
139 entries across 139 versions & 31 rubygems