stylings
git-svn-id: http://svn.barleysodas.com/barleysodas/trunk@34 0f7b21a7-9e3a-4941-bbeb-ce5c7c368fa7master
parent
07aa98e94f
commit
ef4b7b07a8
|
@ -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) }
|
||||
|
|
|
@ -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 }
|
||||
|
|
Reference in New Issue