Sha256: 8cf42a151d19ac7835f7a39d2909a3611a1b0aa108561038274c5c4bc5026ea2

Contents?: true

Size: 632 Bytes

Versions: 10

Compression:

Stored size: 632 Bytes

Contents

module Gluttonberg
  module Public 
    class PublicAssetsController <  ActionController::Base
        def show               
          @asset = Asset.first( :conditions => "id=#{params[:id]} AND  asset_hash like '#{params[:hash]}%' ")
          if @asset.blank?        
            render :layout => "bare" , :template => 'gluttonberg/admin/exceptions/not_found.html.haml' , :status => 404
            return 
          end
          if params[:thumb_name].blank?
            redirect_to @asset.url
          else
            redirect_to @asset.url_for(params[:thumb_name].to_sym)
          end  
        end  
    end
  end  
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gluttonberg-core-2.5.9 app/controllers/gluttonberg/public/public_assets_controller.rb
gluttonberg-core-2.5.8 app/controllers/gluttonberg/public/public_assets_controller.rb
gluttonberg-core-2.5.7 app/controllers/gluttonberg/public/public_assets_controller.rb
gluttonberg-core-2.5.6 app/controllers/gluttonberg/public/public_assets_controller.rb
gluttonberg-core-2.5.5 app/controllers/gluttonberg/public/public_assets_controller.rb
gluttonberg-core-2.5.4 app/controllers/gluttonberg/public/public_assets_controller.rb
gluttonberg-core-2.5.3 app/controllers/gluttonberg/public/public_assets_controller.rb
gluttonberg-core-2.5.2 app/controllers/gluttonberg/public/public_assets_controller.rb
gluttonberg-core-2.5.1 app/controllers/gluttonberg/public/public_assets_controller.rb
gluttonberg-core-2.5 app/controllers/gluttonberg/public/public_assets_controller.rb