class Manifest::PagesController < Manifest::ManifestController before_filter :authorize before_filter :authorize_admin, except: [:index, :show] layout 'manifest/manifest' def index @pages = Page.all end def show @page = Page.find(params[:id]) end def new @page = Page.new end def create @page = Page.new(params[:page]) if @page.save redirect_to manifest_pages_path else render 'new' end end def edit @page = Page.find(params[:id]) end def update @page = Page.find(params[:id]) if @page.update_attributes(params[:page]) redirect_to manifest_pages_path else render 'edit' end end def destroy @page = Page.find(params[:id]) @page.delete redirect_to manifest_pages_path end end