This commit is contained in:
albert
2010-11-19 16:24:17 -05:00
parent a156cc8c62
commit c6304c6e08
41 changed files with 346 additions and 53 deletions

View File

@@ -27,7 +27,7 @@ class ArtistsController < ApplicationController
@artist = Artist.create(params[:artist])
if @artist.errors.empty?
redirect_to artist_path(@artist)
redirect_to artist_path(@artist), :notice => "Artist created"
else
flash[:notice] = "There were errors"
render :action => "new"
@@ -39,7 +39,7 @@ class ArtistsController < ApplicationController
@artist.update_attributes(params[:artist])
if @artist.errors.empty?
redirect_to artist_path(@artist)
redirect_to artist_path(@artist), :notice => "Artist updated"
else
flash[:notice] = "There were errors"
render :action => "edit"
@@ -49,6 +49,6 @@ class ArtistsController < ApplicationController
def revert
@artist = Artist.find(params[:id])
@artist.revert_to!(params[:version])
redirect_to artist_path(@artist)
redirect_to artist_path(@artist), :notice => "Artist updated"
end
end