From ef4b7b07a830f7e914ed7bdaffac4e0c87f7b2bf Mon Sep 17 00:00:00 2001 From: andrew Date: Sat, 17 Nov 2007 07:12:34 +0000 Subject: [PATCH] stylings git-svn-id: http://svn.barleysodas.com/barleysodas/trunk@34 0f7b21a7-9e3a-4941-bbeb-ce5c7c368fa7 --- app/controllers/breweries_controller.rb | 4 ++-- app/controllers/pages_controller.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/breweries_controller.rb b/app/controllers/breweries_controller.rb index c7a7b6d..73c35dc 100644 --- a/app/controllers/breweries_controller.rb +++ b/app/controllers/breweries_controller.rb @@ -57,9 +57,9 @@ class BreweriesController < ApplicationController # PUT /breweries/1 # PUT /breweries/1.xml def update + @page.attributes = params[:page] + @brewery.attributes = params[:brewery] respond_to do |format| - @page.attributes = params[:page] - @brewery.attributes = params[:brewery] if @brewery.save flash[:notice] = 'Brewery was successfully updated.' format.html { redirect_to brewery_url(@brewery.page.title_for_url) } diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index a25e81f..42365f6 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -51,8 +51,9 @@ class PagesController < ApplicationController # PUT /pages/1 # PUT /pages/1.xml def update + @page.attributes = params[:page] respond_to do |format| - if @page.update_attributes(params[:page]) + if @page.save flash[:notice] = 'Page was successfully updated.' format.html { redirect_to page_url({ :id => @page.title_for_url }) } format.xml { head :ok } @@ -67,7 +68,6 @@ class PagesController < ApplicationController # DELETE /pages/1.xml def destroy @page.destroy - respond_to do |format| format.html { redirect_to pages_url } format.xml { head :ok }