Class: Xhive::ImagesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Xhive::ImagesController
- Defined in:
- app/controllers/xhive/images_controller.rb
Instance Method Summary collapse
Methods included from Controller
Instance Method Details
#show ⇒ Object
5 6 7 8 9 |
# File 'app/controllers/xhive/images_controller.rb', line 5 def show @image = current_site.images.where(:image => "#{params[:id]}.#{params[:format]}").first fail ActiveRecord::RecordNotFound unless @image.present? redirect_to @image.image_url, :status => 301 end |