Class: Imagine::ImagesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/imagine/images_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



13
14
15
16
17
18
19
20
21
# File 'app/controllers/imagine/images_controller.rb', line 13

def create
  load_new_image
  if ::Imagine::Warehouses::Image.save(@image)
    redirect_to [@album, @image], :notice => "Image has been attached!"
  else
    flash.now[:error] = "There was a problem creating the image."
    render :action => 'new'
  end
end

#newObject



9
10
11
# File 'app/controllers/imagine/images_controller.rb', line 9

def new
  load_new_image
end

#showObject



5
6
7
# File 'app/controllers/imagine/images_controller.rb', line 5

def show
  load_image
end