Class: Xhive::ImagesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/xhive/images_controller.rb

Instance Method Summary collapse

Methods included from Controller

#current_controller, extended

Instance Method Details

#showObject



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