1 class GamegenreController < ApplicationController
3 # Make sure that a user logs in before doing any action here
4 before_filter :authorize
8 render :action => 'list'
11 # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
12 verify :method => :post, :only => [ :destroy, :create, :update ],
13 :redirect_to => { :action => :list }
16 @gamegenre_pages, @gamegenres = paginate :gamegenres, :per_page => 10
20 @gamegenre = Gamegenre.find(params[:id])
24 @gamegenre = Gamegenre.new
28 @gamegenre = Gamegenre.new(params[:gamegenre])
30 flash[:notice] = 'Gamegenre was successfully created.'
31 redirect_to :action => 'list'
33 render :action => 'new'
38 @gamegenre = Gamegenre.find(params[:id])
42 @gamegenre = Gamegenre.find(params[:id])
43 if @gamegenre.update_attributes(params[:gamegenre])
44 flash[:notice] = 'Gamegenre was successfully updated.'
45 redirect_to :action => 'show', :id => @gamegenre
47 render :action => 'edit'
52 Gamegenre.find(params[:id]).destroy
53 redirect_to :action => 'list'