1 class GamePolicyController < ApplicationController
4 render :action => 'list'
7 # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
8 verify :method => :post, :only => [ :destroy, :create, :update ],
9 :redirect_to => { :action => :list }
12 @game_policy_pages, @game_policies = paginate :game_policies, :per_page => 10
16 @game_policy = GamePolicy.find(params[:id])
20 @game_policy = GamePolicy.new
24 @game_policy = GamePolicy.new(params[:game_policy])
26 flash[:notice] = 'GamePolicy was successfully created.'
27 redirect_to :action => 'list'
29 render :action => 'new'
34 @game_policy = GamePolicy.find(params[:id])
38 @game_policy = GamePolicy.find(params[:id])
39 if @game_policy.update_attributes(params[:game_policy])
40 flash[:notice] = 'GamePolicy was successfully updated.'
41 redirect_to :action => 'show', :id => @game_policy
43 render :action => 'edit'
48 GamePolicy.find(params[:id]).destroy
49 redirect_to :action => 'list'