diff --git a/app/controllers/albums_controller.rb b/app/controllers/albums_controller.rb index 2fb5ac47f..fe33376f3 100644 --- a/app/controllers/albums_controller.rb +++ b/app/controllers/albums_controller.rb @@ -12,7 +12,8 @@ class AlbumsController < ApplicationController flash[:notice] = "Successfully created album." redirect_to @album else - render :action => 'new' + flash[:error] = "Successfully failed." + redirect_to albums_path end end diff --git a/app/views/albums/new.html.haml b/app/views/albums/new.html.haml deleted file mode 100644 index 2f4450cd9..000000000 --- a/app/views/albums/new.html.haml +++ /dev/null @@ -1,14 +0,0 @@ -%h1.big_text - =link_to 'albums', albums_path - >> - new album - -= form_for @album do |f| - = f.error_messages - %p - = f.label :name - = f.text_field :name - %p - = f.submit - -%p= link_to "Back to List", albums_path