Class: Imagine::AlbumsController

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

Instance Method Summary collapse

Instance Method Details

#createObject



15
16
17
18
19
20
21
22
23
# File 'app/controllers/imagine/albums_controller.rb', line 15

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

#indexObject



3
4
# File 'app/controllers/imagine/albums_controller.rb', line 3

def index
end

#newObject



11
12
13
# File 'app/controllers/imagine/albums_controller.rb', line 11

def new
  load_new_album
end

#showObject



6
7
8
9
# File 'app/controllers/imagine/albums_controller.rb', line 6

def show
  load_album
  return render_show_view
end