1 class VideogenreController < 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 @videogenre_pages, @videogenres = paginate :videogenres, :per_page => 10
20 @videogenre = Videogenre.find(params[:id])
24 @videogenre = Videogenre.new
28 @videogenre = Videogenre.new(params[:videogenre])
30 flash[:notice] = 'Videogenre was successfully created.'
31 redirect_to :action => 'list'
33 render :action => 'new'
38 @videogenre = Videogenre.find(params[:id])
42 @videogenre = Videogenre.find(params[:id])
43 if @videogenre.update_attributes(params[:videogenre])
44 flash[:notice] = 'Videogenre was successfully updated.'
45 redirect_to :action => 'show', :id => @videogenre
47 render :action => 'edit'
52 Videogenre.find(params[:id]).destroy
53 redirect_to :action => 'list'