1 class GameGenreController < 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_genre_pages, @game_genres = paginate :game_genres, :per_page => 10
16 @game_genre = GameGenre.find(params[:id])
20 @game_genre = GameGenre.new
24 @game_genre = GameGenre.new(params[:game_genre])
26 flash[:notice] = 'GameGenre was successfully created.'
27 redirect_to :action => 'list'
29 render :action => 'new'
34 @game_genre = GameGenre.find(params[:id])
38 @game_genre = GameGenre.find(params[:id])
39 if @game_genre.update_attributes(params[:game_genre])
40 flash[:notice] = 'GameGenre was successfully updated.'
41 redirect_to :action => 'show', :id => @game_genre
43 render :action => 'edit'
48 GameGenre.find(params[:id]).destroy
49 redirect_to :action => 'list'