Class: Gluttonberg::Public::PublicAssetsController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Gluttonberg::Public::PublicAssetsController
- Defined in:
- app/controllers/gluttonberg/public/public_assets_controller.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/gluttonberg/public/public_assets_controller.rb', line 4 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 |