1 class VideoMediaController < 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 @video_media_pages, @video_medias = paginate :video_medias, :per_page => 10
18 @video_media = VideoMedia.find(params[:id])
22 @video_media = VideoMedia.new
26 @video_media = VideoMedia.new(params[:video_media])
28 flash[:notice] = 'VideoMedia was successfully created.'
29 redirect_to :action => 'list'
31 render :action => 'new'
36 @video_media = VideoMedia.find(params[:id])
40 @video_media = VideoMedia.find(params[:id])
41 if @video_media.update_attributes(params[:video_media])
42 flash[:notice] = 'VideoMedia was successfully updated.'
43 redirect_to :action => 'show', :id => @video_media
45 render :action => 'edit'
50 VideoMedia.find(params[:id]).destroy
51 redirect_to :action => 'list'