1 class GameGenreController < ApplicationController
6 render :action => 'list'
9 # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
10 verify :method => :post, :only => [ :destroy, :create, :update ],
11 :redirect_to => { :action => :list }
14 @game_genre_pages, @game_genres = paginate :game_genres, :per_page => 10
18 @game_genre = GameGenre.find(params[:id])
22 @game_genre = GameGenre.new
26 @game_genre = GameGenre.new(params[:game_genre])
28 flash[:notice] = 'GameGenre was successfully created.'
29 redirect_to :action => 'list'
31 render :action => 'new'
36 @game_genre = GameGenre.find(params[:id])
40 @game_genre = GameGenre.find(params[:id])
41 if @game_genre.update_attributes(params[:game_genre])
42 flash[:notice] = 'GameGenre was successfully updated.'
43 redirect_to :action => 'show', :id => @game_genre
45 render :action => 'edit'
50 GameGenre.find(params[:id]).destroy
51 redirect_to :action => 'list'