Class: Imagine::AlbumsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Imagine::AlbumsController
- Defined in:
- app/controllers/imagine/albums_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
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 |
#index ⇒ Object
3 4 |
# File 'app/controllers/imagine/albums_controller.rb', line 3 def index end |
#new ⇒ Object
11 12 13 |
# File 'app/controllers/imagine/albums_controller.rb', line 11 def new load_new_album end |
#show ⇒ Object
6 7 8 9 |
# File 'app/controllers/imagine/albums_controller.rb', line 6 def show load_album return render_show_view end |