@au.overwrite @user.id
respond_to do |format|
if @au.save
- format.html { redirect_to root_path, notice: 'Author was successfully created.' }
+ flash[:notice] = I18n.t('flash.notice.created', :model => Author.model_name.human)
+ format.html { redirect_to root_path }
format.json { render json: @au.to_json(Author.show_json_opt), status: :created, location: @artist }
else
format.html { render action: "new" }
respond_to do |format|
if @au.save
- format.html { redirect_to '/home/configure', notice: 'Author was successfully updated.' }
+ flash[:notice] = I18n.t('flash.notice.updated', :model => Author.model_name.human)
+ format.html { redirect_to '/home/configure' }
format.json { head :ok }
else
format.html { render action: "edit" }