resources_helper.rb
上传用户:netsea168
上传日期:2022-07-22
资源大小:4652k
文件大小:0k
源码类别:

Ajax

开发平台:

Others

  1. module Admin::ResourcesHelper
  2.   def show_thumbnail(image)
  3.     image.create_thumbnail unless File.exists? "#{RAILS_ROOT}/public/files/thumb_#{image.filename}"
  4.       
  5.     "<img class='tumb' src='#{this_blog.base_url}/files/thumb_#{image.filename}' alt='#{this_blog.base_url}/files/#{image.filename}' />"  
  6.   end
  7.     
  8. end