Skip to content

Commit

Permalink
redirects back to a bars page after creating a beer item
Browse files Browse the repository at this point in the history
  • Loading branch information
greggroth committed Oct 26, 2011
1 parent 043e4e4 commit c739f2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/beer_items_controller.rb
Expand Up @@ -29,7 +29,7 @@ def create

respond_to do |format|
if @beer_item.save
format.html { redirect_to(beer_items_path, :notice => "Beer listing added (#{undo_link})") }
format.html { redirect_to(bar_path(@beer_item.bar), :notice => "Beer listing added (#{undo_link})") }
format.iphone { redirect_to(@beer_item) }
else
format.html { render :action => "new" }
Expand All @@ -49,7 +49,7 @@ def update

respond_to do |format|
if @beer_item.update_attributes(params[:beer_item])
format.html { redirect_to(@beer_item, :notice => "Beer listing updated (#{undo_link})") }
format.html { redirect_to(bar_path(@beer_item.bar), :notice => "Beer listing updated (#{undo_link})") }
format.iphone { redirect_to(@beer_item) }
else
format.html { render :action => "edit" }
Expand Down

0 comments on commit c739f2f

Please sign in to comment.