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