--- /dev/null
+class GameGenreController < ApplicationController
+ def index
+ list
+ render :action => 'list'
+ end
+
+ # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
+ verify :method => :post, :only => [ :destroy, :create, :update ],
+ :redirect_to => { :action => :list }
+
+ def list
+ @game_genre_pages, @game_genres = paginate :game_genres, :per_page => 10
+ end
+
+ def show
+ @game_genre = GameGenre.find(params[:id])
+ end
+
+ def new
+ @game_genre = GameGenre.new
+ end
+
+ def create
+ @game_genre = GameGenre.new(params[:game_genre])
+ if @game_genre.save
+ flash[:notice] = 'GameGenre was successfully created.'
+ redirect_to :action => 'list'
+ else
+ render :action => 'new'
+ end
+ end
+
+ def edit
+ @game_genre = GameGenre.find(params[:id])
+ end
+
+ def update
+ @game_genre = GameGenre.find(params[:id])
+ if @game_genre.update_attributes(params[:game_genre])
+ flash[:notice] = 'GameGenre was successfully updated.'
+ redirect_to :action => 'show', :id => @game_genre
+ else
+ render :action => 'edit'
+ end
+ end
+
+ def destroy
+ GameGenre.find(params[:id]).destroy
+ redirect_to :action => 'list'
+ end
+end
--- /dev/null
+class GamePlatformController < ApplicationController
+ def index
+ list
+ render :action => 'list'
+ end
+
+ # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
+ verify :method => :post, :only => [ :destroy, :create, :update ],
+ :redirect_to => { :action => :list }
+
+ def list
+ @game_platform_pages, @game_platforms = paginate :game_platforms, :per_page => 10
+ end
+
+ def show
+ @game_platform = GamePlatform.find(params[:id])
+ end
+
+ def new
+ @game_platform = GamePlatform.new
+ end
+
+ def create
+ @game_platform = GamePlatform.new(params[:game_platform])
+ if @game_platform.save
+ flash[:notice] = 'GamePlatform was successfully created.'
+ redirect_to :action => 'list'
+ else
+ render :action => 'new'
+ end
+ end
+
+ def edit
+ @game_platform = GamePlatform.find(params[:id])
+ end
+
+ def update
+ @game_platform = GamePlatform.find(params[:id])
+ if @game_platform.update_attributes(params[:game_platform])
+ flash[:notice] = 'GamePlatform was successfully updated.'
+ redirect_to :action => 'show', :id => @game_platform
+ else
+ render :action => 'edit'
+ end
+ end
+
+ def destroy
+ GamePlatform.find(params[:id]).destroy
+ redirect_to :action => 'list'
+ end
+end
+++ /dev/null
-class GamegenreController < ApplicationController
-
- # Make sure that a user logs in before doing any action here
- before_filter :authorize
-
- def index
- list
- render :action => 'list'
- end
-
- # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
- verify :method => :post, :only => [ :destroy, :create, :update ],
- :redirect_to => { :action => :list }
-
- def list
- @gamegenre_pages, @gamegenres = paginate :gamegenres, :per_page => 10
- end
-
- def show
- @gamegenre = Gamegenre.find(params[:id])
- end
-
- def new
- @gamegenre = Gamegenre.new
- end
-
- def create
- @gamegenre = Gamegenre.new(params[:gamegenre])
- if @gamegenre.save
- flash[:notice] = 'Gamegenre was successfully created.'
- redirect_to :action => 'list'
- else
- render :action => 'new'
- end
- end
-
- def edit
- @gamegenre = Gamegenre.find(params[:id])
- end
-
- def update
- @gamegenre = Gamegenre.find(params[:id])
- if @gamegenre.update_attributes(params[:gamegenre])
- flash[:notice] = 'Gamegenre was successfully updated.'
- redirect_to :action => 'show', :id => @gamegenre
- else
- render :action => 'edit'
- end
- end
-
- def destroy
- Gamegenre.find(params[:id]).destroy
- redirect_to :action => 'list'
- end
-end
+++ /dev/null
-class GameplatformController < ApplicationController
-
- # Make sure that a user logs in before doing any action here
- before_filter :authorize
-
- def index
- list
- render :action => 'list'
- end
-
- # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
- verify :method => :post, :only => [ :destroy, :create, :update ],
- :redirect_to => { :action => :list }
-
- def list
- @gameplatform_pages, @gameplatforms = paginate :gameplatforms, :per_page => 10
- end
-
- def show
- @gameplatform = Gameplatform.find(params[:id])
- end
-
- def new
- @gameplatform = Gameplatform.new
- end
-
- def create
- @gameplatform = Gameplatform.new(params[:gameplatform])
- if @gameplatform.save
- flash[:notice] = 'Gameplatform was successfully created.'
- redirect_to :action => 'list'
- else
- render :action => 'new'
- end
- end
-
- def edit
- @gameplatform = Gameplatform.find(params[:id])
- end
-
- def update
- @gameplatform = Gameplatform.find(params[:id])
- if @gameplatform.update_attributes(params[:gameplatform])
- flash[:notice] = 'Gameplatform was successfully updated.'
- redirect_to :action => 'show', :id => @gameplatform
- else
- render :action => 'edit'
- end
- end
-
- def destroy
- Gameplatform.find(params[:id]).destroy
- redirect_to :action => 'list'
- end
-end
+++ /dev/null
-class MediaController < ApplicationController
-
- # Make sure that a user logs in before doing any action here
- before_filter :authorize
-
- def index
- list
- render :action => 'list'
- end
-
- # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
- verify :method => :post, :only => [ :destroy, :create, :update ],
- :redirect_to => { :action => :list }
-
- def list
- @media_pages, @medias = paginate :medias, :per_page => 10
- end
-
- def show
- @media = Media.find(params[:id])
- end
-
- def new
- @media = Media.new
- end
-
- def create
- @media = Media.new(params[:media])
- if @media.save
- flash[:notice] = 'Media was successfully created.'
- redirect_to :action => 'list'
- else
- render :action => 'new'
- end
- end
-
- def edit
- @media = Media.find(params[:id])
- end
-
- def update
- @media = Media.find(params[:id])
- if @media.update_attributes(params[:media])
- flash[:notice] = 'Media was successfully updated.'
- redirect_to :action => 'show', :id => @media
- else
- render :action => 'edit'
- end
- end
-
- def destroy
- Media.find(params[:id]).destroy
- redirect_to :action => 'list'
- end
-end
--- /dev/null
+class VideoGenreController < ApplicationController
+ def index
+ list
+ render :action => 'list'
+ end
+
+ # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
+ verify :method => :post, :only => [ :destroy, :create, :update ],
+ :redirect_to => { :action => :list }
+
+ def list
+ @video_genre_pages, @video_genres = paginate :video_genres, :per_page => 10
+ end
+
+ def show
+ @video_genre = VideoGenre.find(params[:id])
+ end
+
+ def new
+ @video_genre = VideoGenre.new
+ end
+
+ def create
+ @video_genre = VideoGenre.new(params[:video_genre])
+ if @video_genre.save
+ flash[:notice] = 'VideoGenre was successfully created.'
+ redirect_to :action => 'list'
+ else
+ render :action => 'new'
+ end
+ end
+
+ def edit
+ @video_genre = VideoGenre.find(params[:id])
+ end
+
+ def update
+ @video_genre = VideoGenre.find(params[:id])
+ if @video_genre.update_attributes(params[:video_genre])
+ flash[:notice] = 'VideoGenre was successfully updated.'
+ redirect_to :action => 'show', :id => @video_genre
+ else
+ render :action => 'edit'
+ end
+ end
+
+ def destroy
+ VideoGenre.find(params[:id]).destroy
+ redirect_to :action => 'list'
+ end
+end
--- /dev/null
+class VideoMediaController < ApplicationController
+ def index
+ list
+ render :action => 'list'
+ end
+
+ # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
+ verify :method => :post, :only => [ :destroy, :create, :update ],
+ :redirect_to => { :action => :list }
+
+ def list
+ @video_media_pages, @video_medias = paginate :video_medias, :per_page => 10
+ end
+
+ def show
+ @video_media = VideoMedia.find(params[:id])
+ end
+
+ def new
+ @video_media = VideoMedia.new
+ end
+
+ def create
+ @video_media = VideoMedia.new(params[:video_media])
+ if @video_media.save
+ flash[:notice] = 'VideoMedia was successfully created.'
+ redirect_to :action => 'list'
+ else
+ render :action => 'new'
+ end
+ end
+
+ def edit
+ @video_media = VideoMedia.find(params[:id])
+ end
+
+ def update
+ @video_media = VideoMedia.find(params[:id])
+ if @video_media.update_attributes(params[:video_media])
+ flash[:notice] = 'VideoMedia was successfully updated.'
+ redirect_to :action => 'show', :id => @video_media
+ else
+ render :action => 'edit'
+ end
+ end
+
+ def destroy
+ VideoMedia.find(params[:id]).destroy
+ redirect_to :action => 'list'
+ end
+end
+++ /dev/null
-class VideogenreController < ApplicationController
-
- # Make sure that a user logs in before doing any action here
- before_filter :authorize
-
- def index
- list
- render :action => 'list'
- end
-
- # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
- verify :method => :post, :only => [ :destroy, :create, :update ],
- :redirect_to => { :action => :list }
-
- def list
- @videogenre_pages, @videogenres = paginate :videogenres, :per_page => 10
- end
-
- def show
- @videogenre = Videogenre.find(params[:id])
- end
-
- def new
- @videogenre = Videogenre.new
- end
-
- def create
- @videogenre = Videogenre.new(params[:videogenre])
- if @videogenre.save
- flash[:notice] = 'Videogenre was successfully created.'
- redirect_to :action => 'list'
- else
- render :action => 'new'
- end
- end
-
- def edit
- @videogenre = Videogenre.find(params[:id])
- end
-
- def update
- @videogenre = Videogenre.find(params[:id])
- if @videogenre.update_attributes(params[:videogenre])
- flash[:notice] = 'Videogenre was successfully updated.'
- redirect_to :action => 'show', :id => @videogenre
- else
- render :action => 'edit'
- end
- end
-
- def destroy
- Videogenre.find(params[:id]).destroy
- redirect_to :action => 'list'
- end
-end
--- /dev/null
+module GameGenreHelper
+end
--- /dev/null
+module GamePlatformHelper
+end
+++ /dev/null
-module GamegenreHelper
-end
+++ /dev/null
-module GameplatformHelper
-end
+++ /dev/null
-module MediaHelper
-end
--- /dev/null
+module VideoGenreHelper
+end
--- /dev/null
+module VideoMediaHelper
+end
+++ /dev/null
-module VideogenreHelper
-end
class Game < Rentable
- has_many :game_genres, :through => Gamegenre
- has_many :gameplatforms, :through => Gameplatform
+ has_many :game_genres
+ has_many :game_platforms
- validates_presence_of :game_genre
- validates_presence_of :platform
+ validates_presence_of :game_genre_id
+ validates_presence_of :game_platform_id
def genre
- return Gamegenre.find(game_genre).name
+ GameGenre.find_by_id(game_genre_id)
end
- def game_platform
- return Gameplatform.find(platform).name
+ def platform
+ GamePlatform.find_by_id(game_platform_id)
end
def calculated_price
return Time.now.advance(:days => period).to_date
end
- def genre_name
- Gamegenre.find_by_id(game_genre).name
- end
-
- def platform_name
- Gameplatform.find_by_id(platform).name
- end
-
end
--- /dev/null
+class GameGenre < ActiveRecord::Base
+ belongs_to :game
+end
--- /dev/null
+class GamePlatform < ActiveRecord::Base
+ belongs_to :game
+end
+++ /dev/null
-class Gamegenre < ActiveRecord::Base
- belongs_to :game
-end
+++ /dev/null
-class Gameplatform < ActiveRecord::Base
- belongs_to :game
-end
class Video < Rentable
has_many :video_genres
- has_many :medias
+ has_many :video_medias
validates_presence_of :director
- validates_presence_of :video_genre
- validates_presence_of :media
+ validates_presence_of :video_genre_id
+ validates_presence_of :video_media_id
def genre
- return Videogenre.find(video_genre).name
+ VideoGenre.find_by_id(video_genre_id)
end
- def media_name
- return Media.find(media).name
+ def media
+ VideoMedia.find_by_id(video_media_id)
end
def calculated_price
protected
def validate
errors.add(:video_genre, "does not exist in the database") if video_genre.nil?
- errors.add(:media, "does not exist in the database") if media.nil?
+ errors.add(:video_media, "does not exist in the database") if video_media.nil?
end
end
-class Media < ActiveRecord::Base
+class VideoGenre < ActiveRecord::Base
belongs_to :video
validates_presence_of :name
-class Videogenre < ActiveRecord::Base
+class VideoMedia < ActiveRecord::Base
belongs_to :video
validates_presence_of :name
<p><label for="game_newrelease">New Release</label><br/>
<%= check_box 'game', 'newrelease' %></p>
-<p><label for="game_platform">Platform</label><br/>
-<%= select 'game', 'platform', Gameplatform.find(:all).collect {|c| [c.name.to_s, c.id] } %></p>
+<p><label for="game_game_platform_id">Platform</label><br/>
+<%= select 'game', 'game_platform_id', GamePlatform.find(:all).collect {|c| [c.name.to_s, c.id] } %></p>
-<p><label for="game_genre">Genre</label><br/>
-<%= select 'game', 'game_genre', Gamegenre.find(:all).collect {|c| [c.name.to_s, c.id] } %></p>
+<p><label for="game_game_genre_id">Genre</label><br/>
+<%= select 'game', 'game_genre_id', GameGenre.find(:all).collect {|c| [c.name.to_s, c.id] } %></p>
<!--[eoform:game]-->
<td><%=h game.title %></td>
<td><%=h tf_to_yesno(game.checkedout?) %></td>
<td><%=h tf_to_yesno(game.newrelease) %></td>
- <td><%=h game.genre %></td>
- <td><%=h game.game_platform %></td>
+ <td><%=h game.genre.name %></td>
+ <td><%=h game.platform.name %></td>
<td><%= link_to 'View', :action => 'show', :id => game %></td>
<td><%= link_to 'Edit', :action => 'edit', :id => game %></td>
<td><%= link_to 'Remove', { :action => 'destroy', :id => game }, :confirm => 'Are you sure?', :method => :post %></td>
<td><%=h game.title %></td>
<td><%=h tf_to_yesno(game.checkedout?) %></td>
<td><%=h tf_to_yesno(game.newrelease) %></td>
- <td><%=h game.genre %></td>
- <td><%=h game.game_platform %></td>
+ <td><%=h game.genre.name %></td>
+ <td><%=h game.platform.name %></td>
<td><%= link_to 'View', :action => 'show', :id => game %></td>
<td><%= link_to 'Edit', :action => 'edit', :id => game %></td>
<td><%= link_to 'Remove', { :action => 'destroy', :id => game }, :confirm => 'Are you sure?', :method => :post %></td>
<p><b>Game ID:</b> <%=h @game.id.to_s %></p>
<p><b>Title:</b> <%=h @game.title %></p>
<p><b>New Release:</b> <%=h tf_to_yesno(@game.newrelease) %></p>
-<p><b>Genre:</b> <%=h @game.genre_name %></p>
-<p><b>Platform:</b> <%=h @game.platform_name %></p>
+<p><b>Genre:</b> <%=h @game.genre.name %></p>
+<p><b>Platform:</b> <%=h @game.platform.name %></p>
<%= link_to 'Edit', :action => 'edit', :id => @game %> |
--- /dev/null
+<%= error_messages_for 'game_genre' %>
+
+<!--[form:game_genre]-->
+<p><label for="game_genre_name">Name</label><br/>
+<%= text_field 'game_genre', 'name' %></p>
+<!--[eoform:game_genre]-->
+
--- /dev/null
+<h1>Editing game_genre</h1>
+
+<% form_tag :action => 'update', :id => @game_genre do %>
+ <%= render :partial => 'form' %>
+ <%= submit_tag 'Edit' %>
+<% end %>
+
+<%= link_to 'Show', :action => 'show', :id => @game_genre %> |
+<%= link_to 'Back', :action => 'list' %>
--- /dev/null
+<h1>Listing game_genres</h1>
+
+<table>
+ <tr>
+ <% for column in GameGenre.content_columns %>
+ <th><%= column.human_name %></th>
+ <% end %>
+ </tr>
+
+<% for game_genre in @game_genres %>
+ <tr>
+ <% for column in GameGenre.content_columns %>
+ <td><%=h game_genre.send(column.name) %></td>
+ <% end %>
+ <td><%= link_to 'Show', :action => 'show', :id => game_genre %></td>
+ <td><%= link_to 'Edit', :action => 'edit', :id => game_genre %></td>
+ <td><%= link_to 'Destroy', { :action => 'destroy', :id => game_genre }, :confirm => 'Are you sure?', :method => :post %></td>
+ </tr>
+<% end %>
+</table>
+
+<%= link_to 'Previous page', { :page => @game_genre_pages.current.previous } if @game_genre_pages.current.previous %>
+<%= link_to 'Next page', { :page => @game_genre_pages.current.next } if @game_genre_pages.current.next %>
+
+<br />
+
+<%= link_to 'New game_genre', :action => 'new' %>
-<h1>New videogenre</h1>
+<h1>New game_genre</h1>
<% form_tag :action => 'create' do %>
<%= render :partial => 'form' %>
--- /dev/null
+<% for column in GameGenre.content_columns %>
+<p>
+ <b><%= column.human_name %>:</b> <%=h @game_genre.send(column.name) %>
+</p>
+<% end %>
+
+<%= link_to 'Edit', :action => 'edit', :id => @game_genre %> |
+<%= link_to 'Back', :action => 'list' %>
--- /dev/null
+<%= error_messages_for 'game_platform' %>
+
+<!--[form:game_platform]-->
+<p><label for="game_platform_name">Name</label><br/>
+<%= text_field 'game_platform', 'name' %></p>
+<!--[eoform:game_platform]-->
+
--- /dev/null
+<h1>Editing game_platform</h1>
+
+<% form_tag :action => 'update', :id => @game_platform do %>
+ <%= render :partial => 'form' %>
+ <%= submit_tag 'Edit' %>
+<% end %>
+
+<%= link_to 'Show', :action => 'show', :id => @game_platform %> |
+<%= link_to 'Back', :action => 'list' %>
--- /dev/null
+<h1>Listing game_platforms</h1>
+
+<table>
+ <tr>
+ <% for column in GamePlatform.content_columns %>
+ <th><%= column.human_name %></th>
+ <% end %>
+ </tr>
+
+<% for game_platform in @game_platforms %>
+ <tr>
+ <% for column in GamePlatform.content_columns %>
+ <td><%=h game_platform.send(column.name) %></td>
+ <% end %>
+ <td><%= link_to 'Show', :action => 'show', :id => game_platform %></td>
+ <td><%= link_to 'Edit', :action => 'edit', :id => game_platform %></td>
+ <td><%= link_to 'Destroy', { :action => 'destroy', :id => game_platform }, :confirm => 'Are you sure?', :method => :post %></td>
+ </tr>
+<% end %>
+</table>
+
+<%= link_to 'Previous page', { :page => @game_platform_pages.current.previous } if @game_platform_pages.current.previous %>
+<%= link_to 'Next page', { :page => @game_platform_pages.current.next } if @game_platform_pages.current.next %>
+
+<br />
+
+<%= link_to 'New game_platform', :action => 'new' %>
-<h1>New gameplatform</h1>
+<h1>New game_platform</h1>
<% form_tag :action => 'create' do %>
<%= render :partial => 'form' %>
--- /dev/null
+<% for column in GamePlatform.content_columns %>
+<p>
+ <b><%= column.human_name %>:</b> <%=h @game_platform.send(column.name) %>
+</p>
+<% end %>
+
+<%= link_to 'Edit', :action => 'edit', :id => @game_platform %> |
+<%= link_to 'Back', :action => 'list' %>
+++ /dev/null
-<%= error_messages_for 'gamegenre' %>
-
-<!--[form:gamegenre]-->
-<p><label for="gamegenre_name">Name</label><br/>
-<%= text_field 'gamegenre', 'name' %></p>
-<!--[eoform:gamegenre]-->
-
+++ /dev/null
-<h1>Editing gamegenre</h1>
-
-<% form_tag :action => 'update', :id => @gamegenre do %>
- <%= render :partial => 'form' %>
- <%= submit_tag 'Edit' %>
-<% end %>
-
-<%= link_to 'Show', :action => 'show', :id => @gamegenre %> |
-<%= link_to 'Back', :action => 'list' %>
+++ /dev/null
-<h1>Listing gamegenres</h1>
-
-<table>
- <tr>
- <% for column in Gamegenre.content_columns %>
- <th><%= column.human_name %></th>
- <% end %>
- </tr>
-
-<% for gamegenre in @gamegenres %>
- <tr>
- <% for column in Gamegenre.content_columns %>
- <td><%=h gamegenre.send(column.name) %></td>
- <% end %>
- <td><%= link_to 'Show', :action => 'show', :id => gamegenre %></td>
- <td><%= link_to 'Edit', :action => 'edit', :id => gamegenre %></td>
- <td><%= link_to 'Destroy', { :action => 'destroy', :id => gamegenre }, :confirm => 'Are you sure?', :method => :post %></td>
- </tr>
-<% end %>
-</table>
-
-<%= link_to 'Previous page', { :page => @gamegenre_pages.current.previous } if @gamegenre_pages.current.previous %>
-<%= link_to 'Next page', { :page => @gamegenre_pages.current.next } if @gamegenre_pages.current.next %>
-
-<br />
-
-<%= link_to 'New gamegenre', :action => 'new' %>
+++ /dev/null
-<% for column in Gamegenre.content_columns %>
-<p>
- <b><%= column.human_name %>:</b> <%=h @gamegenre.send(column.name) %>
-</p>
-<% end %>
-
-<%= link_to 'Edit', :action => 'edit', :id => @gamegenre %> |
-<%= link_to 'Back', :action => 'list' %>
+++ /dev/null
-<%= error_messages_for 'gameplatform' %>
-
-<!--[form:gameplatform]-->
-<p><label for="gameplatform_name">Name</label><br/>
-<%= text_field 'gameplatform', 'name' %></p>
-<!--[eoform:gameplatform]-->
-
+++ /dev/null
-<h1>Editing gameplatform</h1>
-
-<% form_tag :action => 'update', :id => @gameplatform do %>
- <%= render :partial => 'form' %>
- <%= submit_tag 'Edit' %>
-<% end %>
-
-<%= link_to 'Show', :action => 'show', :id => @gameplatform %> |
-<%= link_to 'Back', :action => 'list' %>
+++ /dev/null
-<h1>Listing gameplatforms</h1>
-
-<table>
- <tr>
- <% for column in Gameplatform.content_columns %>
- <th><%= column.human_name %></th>
- <% end %>
- </tr>
-
-<% for gameplatform in @gameplatforms %>
- <tr>
- <% for column in Gameplatform.content_columns %>
- <td><%=h gameplatform.send(column.name) %></td>
- <% end %>
- <td><%= link_to 'Show', :action => 'show', :id => gameplatform %></td>
- <td><%= link_to 'Edit', :action => 'edit', :id => gameplatform %></td>
- <td><%= link_to 'Destroy', { :action => 'destroy', :id => gameplatform }, :confirm => 'Are you sure?', :method => :post %></td>
- </tr>
-<% end %>
-</table>
-
-<%= link_to 'Previous page', { :page => @gameplatform_pages.current.previous } if @gameplatform_pages.current.previous %>
-<%= link_to 'Next page', { :page => @gameplatform_pages.current.next } if @gameplatform_pages.current.next %>
-
-<br />
-
-<%= link_to 'New gameplatform', :action => 'new' %>
+++ /dev/null
-<% for column in Gameplatform.content_columns %>
-<p>
- <b><%= column.human_name %>:</b> <%=h @gameplatform.send(column.name) %>
-</p>
-<% end %>
-
-<%= link_to 'Edit', :action => 'edit', :id => @gameplatform %> |
-<%= link_to 'Back', :action => 'list' %>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
- <title>Gamegenre: <%= controller.action_name %></title>
+ <title>GameGenre: <%= controller.action_name %></title>
<%= stylesheet_link_tag 'scaffold' %>
</head>
<body>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
- <title>Gameplatform: <%= controller.action_name %></title>
+ <title>GamePlatform: <%= controller.action_name %></title>
<%= stylesheet_link_tag 'scaffold' %>
</head>
<body>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
- <title>Media: <%= controller.action_name %></title>
+ <title>VideoGenre: <%= controller.action_name %></title>
<%= stylesheet_link_tag 'scaffold' %>
</head>
<body>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
- <title>Videogenre: <%= controller.action_name %></title>
+ <title>VideoMedia: <%= controller.action_name %></title>
<%= stylesheet_link_tag 'scaffold' %>
</head>
<body>
+++ /dev/null
-<%= error_messages_for 'media' %>
-
-<!--[form:media]-->
-<p><label for="media_name">Name</label><br/>
-<%= text_field 'media', 'name' %></p>
-<!--[eoform:media]-->
-
+++ /dev/null
-<h1>Editing media</h1>
-
-<% form_tag :action => 'update', :id => @media do %>
- <%= render :partial => 'form' %>
- <%= submit_tag 'Edit' %>
-<% end %>
-
-<%= link_to 'Show', :action => 'show', :id => @media %> |
-<%= link_to 'Back', :action => 'list' %>
+++ /dev/null
-<h1>Listing medias</h1>
-
-<table>
- <tr>
- <% for column in Media.content_columns %>
- <th><%= column.human_name %></th>
- <% end %>
- </tr>
-
-<% for media in @medias %>
- <tr>
- <% for column in Media.content_columns %>
- <td><%=h media.send(column.name) %></td>
- <% end %>
- <td><%= link_to 'Show', :action => 'show', :id => media %></td>
- <td><%= link_to 'Edit', :action => 'edit', :id => media %></td>
- <td><%= link_to 'Destroy', { :action => 'destroy', :id => media }, :confirm => 'Are you sure?', :method => :post %></td>
- </tr>
-<% end %>
-</table>
-
-<%= link_to 'Previous page', { :page => @media_pages.current.previous } if @media_pages.current.previous %>
-<%= link_to 'Next page', { :page => @media_pages.current.next } if @media_pages.current.next %>
-
-<br />
-
-<%= link_to 'New media', :action => 'new' %>
+++ /dev/null
-<% for column in Media.content_columns %>
-<p>
- <b><%= column.human_name %>:</b> <%=h @media.send(column.name) %>
-</p>
-<% end %>
-
-<%= link_to 'Edit', :action => 'edit', :id => @media %> |
-<%= link_to 'Back', :action => 'list' %>
<p><label for="video_newrelease">Newrelease</label><br/>
<%= check_box 'video', 'newrelease' %></p>
-<p><label for="video_genre">Genre</label><br/>
-<%= select 'video', 'video_genre', Videogenre.find(:all).collect {|c| [c.name.to_s, c.id] } %></p>
+<p><label for="video_video_genre_id">Genre</label><br/>
+<%= select 'video', 'video_genre_id', VideoGenre.find(:all).collect {|c| [c.name.to_s, c.id] } %></p>
<p><label for="video_director">Director</label><br/>
<%= text_field 'video', 'director' %></p>
-<p><label for="video_media">Media</label><br/>
-<%= select 'video', 'media', Media.find(:all).collect {|c| [c.name.to_s, c.id] } %></p>
+<p><label for="video_video_media_id">Media</label><br/>
+<%= select 'video', 'video_media_id', VideoMedia.find(:all).collect {|c| [c.name.to_s, c.id] } %></p>
<!--[eoform:video]-->
<td><%=h video.title %></td>
<td><%=h tf_to_yesno(video.checkedout?) %></td>
<td><%=h tf_to_yesno(video.newrelease) %></td>
- <td><%=h video.genre %></td>
+ <td><%=h video.genre.name %></td>
<td><%=h video.director %></td>
- <td><%=h video.media_name %></td>
+ <td><%=h video.media.name %></td>
<td><%= link_to 'View', :action => 'show', :id => video %></td>
<td><%= link_to 'Edit', :action => 'edit', :id => video %></td>
<td><%= link_to 'Remove', { :action => 'destroy', :id => video }, :confirm => 'Are you sure?', :method => :post %></td>
<td><%=h video.title %></td>
<td><%=h tf_to_yesno(video.checkedout?) %></td>
<td><%=h tf_to_yesno(video.newrelease) %></td>
- <td><%=h video.genre %></td>
+ <td><%=h video.genre.name %></td>
<td><%=h video.director %></td>
- <td><%=h video.media_name %></td>
+ <td><%=h video.media.name %></td>
<td><%= link_to 'View', :action => 'show', :id => video %></td>
<td><%= link_to 'Edit', :action => 'edit', :id => video %></td>
<td><%= link_to 'Remove', { :action => 'destroy', :id => video }, :confirm => 'Are you sure?', :post => true %></td>
<p><b>Video ID:</b> <%=h @video.id.to_s %></p>
<p><b>Title:</b> <%=h @video.title %></p>
<p><b>New Release:</b> <%=h tf_to_yesno(@video.newrelease) %></p>
-<p><b>Genre:</b> <%=h @video.genre %></p>
+<p><b>Genre:</b> <%=h @video.genre.name %></p>
<p><b>Director:</b> <%=h @video.director %></p>
-<p><b>Media:</b> <%=h @video.media_name %></p>
+<p><b>Media:</b> <%=h @video.media.name %></p>
<%= link_to 'Edit', :action => 'edit', :id => @video %> |
<%= link_to 'Back', :action => 'list' %>
--- /dev/null
+<%= error_messages_for 'video_genre' %>
+
+<!--[form:video_genre]-->
+<p><label for="video_genre_name">Name</label><br/>
+<%= text_field 'video_genre', 'name' %></p>
+<!--[eoform:video_genre]-->
+
--- /dev/null
+<h1>Editing video_genre</h1>
+
+<% form_tag :action => 'update', :id => @video_genre do %>
+ <%= render :partial => 'form' %>
+ <%= submit_tag 'Edit' %>
+<% end %>
+
+<%= link_to 'Show', :action => 'show', :id => @video_genre %> |
+<%= link_to 'Back', :action => 'list' %>
--- /dev/null
+<h1>Listing video_genres</h1>
+
+<table>
+ <tr>
+ <% for column in VideoGenre.content_columns %>
+ <th><%= column.human_name %></th>
+ <% end %>
+ </tr>
+
+<% for video_genre in @video_genres %>
+ <tr>
+ <% for column in VideoGenre.content_columns %>
+ <td><%=h video_genre.send(column.name) %></td>
+ <% end %>
+ <td><%= link_to 'Show', :action => 'show', :id => video_genre %></td>
+ <td><%= link_to 'Edit', :action => 'edit', :id => video_genre %></td>
+ <td><%= link_to 'Destroy', { :action => 'destroy', :id => video_genre }, :confirm => 'Are you sure?', :method => :post %></td>
+ </tr>
+<% end %>
+</table>
+
+<%= link_to 'Previous page', { :page => @video_genre_pages.current.previous } if @video_genre_pages.current.previous %>
+<%= link_to 'Next page', { :page => @video_genre_pages.current.next } if @video_genre_pages.current.next %>
+
+<br />
+
+<%= link_to 'New video_genre', :action => 'new' %>
-<h1>New media</h1>
+<h1>New video_genre</h1>
<% form_tag :action => 'create' do %>
<%= render :partial => 'form' %>
--- /dev/null
+<% for column in VideoGenre.content_columns %>
+<p>
+ <b><%= column.human_name %>:</b> <%=h @video_genre.send(column.name) %>
+</p>
+<% end %>
+
+<%= link_to 'Edit', :action => 'edit', :id => @video_genre %> |
+<%= link_to 'Back', :action => 'list' %>
--- /dev/null
+<%= error_messages_for 'video_media' %>
+
+<!--[form:video_media]-->
+<p><label for="video_media_name">Name</label><br/>
+<%= text_field 'video_media', 'name' %></p>
+<!--[eoform:video_media]-->
+
--- /dev/null
+<h1>Editing video_media</h1>
+
+<% form_tag :action => 'update', :id => @video_media do %>
+ <%= render :partial => 'form' %>
+ <%= submit_tag 'Edit' %>
+<% end %>
+
+<%= link_to 'Show', :action => 'show', :id => @video_media %> |
+<%= link_to 'Back', :action => 'list' %>
--- /dev/null
+<h1>Listing video_medias</h1>
+
+<table>
+ <tr>
+ <% for column in VideoMedia.content_columns %>
+ <th><%= column.human_name %></th>
+ <% end %>
+ </tr>
+
+<% for video_media in @video_medias %>
+ <tr>
+ <% for column in VideoMedia.content_columns %>
+ <td><%=h video_media.send(column.name) %></td>
+ <% end %>
+ <td><%= link_to 'Show', :action => 'show', :id => video_media %></td>
+ <td><%= link_to 'Edit', :action => 'edit', :id => video_media %></td>
+ <td><%= link_to 'Destroy', { :action => 'destroy', :id => video_media }, :confirm => 'Are you sure?', :method => :post %></td>
+ </tr>
+<% end %>
+</table>
+
+<%= link_to 'Previous page', { :page => @video_media_pages.current.previous } if @video_media_pages.current.previous %>
+<%= link_to 'Next page', { :page => @video_media_pages.current.next } if @video_media_pages.current.next %>
+
+<br />
+
+<%= link_to 'New video_media', :action => 'new' %>
-<h1>New gamegenre</h1>
+<h1>New video_media</h1>
<% form_tag :action => 'create' do %>
<%= render :partial => 'form' %>
--- /dev/null
+<% for column in VideoMedia.content_columns %>
+<p>
+ <b><%= column.human_name %>:</b> <%=h @video_media.send(column.name) %>
+</p>
+<% end %>
+
+<%= link_to 'Edit', :action => 'edit', :id => @video_media %> |
+<%= link_to 'Back', :action => 'list' %>
+++ /dev/null
-<%= error_messages_for 'videogenre' %>
-
-<!--[form:videogenre]-->
-<p><label for="videogenre_name">Name</label><br/>
-<%= text_field 'videogenre', 'name' %></p>
-<!--[eoform:videogenre]-->
-
+++ /dev/null
-<h1>Editing videogenre</h1>
-
-<% form_tag :action => 'update', :id => @videogenre do %>
- <%= render :partial => 'form' %>
- <%= submit_tag 'Edit' %>
-<% end %>
-
-<%= link_to 'Show', :action => 'show', :id => @videogenre %> |
-<%= link_to 'Back', :action => 'list' %>
+++ /dev/null
-<h1>Listing videogenres</h1>
-
-<table>
- <tr>
- <% for column in Videogenre.content_columns %>
- <th><%= column.human_name %></th>
- <% end %>
- </tr>
-
-<% for videogenre in @videogenres %>
- <tr>
- <% for column in Videogenre.content_columns %>
- <td><%=h videogenre.send(column.name) %></td>
- <% end %>
- <td><%= link_to 'Show', :action => 'show', :id => videogenre %></td>
- <td><%= link_to 'Edit', :action => 'edit', :id => videogenre %></td>
- <td><%= link_to 'Destroy', { :action => 'destroy', :id => videogenre }, :confirm => 'Are you sure?', :method => :post %></td>
- </tr>
-<% end %>
-</table>
-
-<%= link_to 'Previous page', { :page => @videogenre_pages.current.previous } if @videogenre_pages.current.previous %>
-<%= link_to 'Next page', { :page => @videogenre_pages.current.next } if @videogenre_pages.current.next %>
-
-<br />
-
-<%= link_to 'New videogenre', :action => 'new' %>
+++ /dev/null
-<% for column in Videogenre.content_columns %>
-<p>
- <b><%= column.human_name %>:</b> <%=h @videogenre.send(column.name) %>
-</p>
-<% end %>
-
-<%= link_to 'Edit', :action => 'edit', :id => @videogenre %> |
-<%= link_to 'Back', :action => 'list' %>
--- /dev/null
+class CreateVideoGenres < ActiveRecord::Migration
+ def self.up
+ create_table :video_genres do |t|
+ t.column :name, :string, :null => false
+ end
+ end
+
+ def self.down
+ drop_table :video_genres
+ end
+end
--- /dev/null
+class CreateVideoMedias < ActiveRecord::Migration
+ def self.up
+ create_table :video_medias do |t|
+ t.column :name, :string, :null => false
+ end
+ end
+
+ def self.down
+ drop_table :video_medias
+ end
+end
--- /dev/null
+class CreateGameGenres < ActiveRecord::Migration
+ def self.up
+ create_table :game_genres do |t|
+ t.column :name, :string, :null => false
+ end
+ end
+
+ def self.down
+ drop_table :game_genres
+ end
+end
--- /dev/null
+class CreateGamePlatforms < ActiveRecord::Migration
+ def self.up
+ create_table :game_platforms do |t|
+ t.column :name, :string, :null => false
+ end
+ end
+
+ def self.down
+ drop_table :game_platforms
+ end
+end
--- /dev/null
+class FixRentables < ActiveRecord::Migration
+ def self.up
+ drop_table :gamegenres
+ drop_table :medias
+ drop_table :gameplatforms
+ drop_table :videogenres
+ end
+
+ def self.down
+ raise ActiveRecord::IrreversibleMigration
+ end
+end
# migrations feature of ActiveRecord to incrementally modify your database, and
# then regenerate this schema definition.
-ActiveRecord::Schema.define(:version => 27) do
+ActiveRecord::Schema.define(:version => 32) do
create_table "coitems", :force => true do |t|
t.column "customer_id", :integer
t.column "debt", :decimal, :default => 0.0
end
- create_table "game_policies", :force => true do |t|
- t.column "day", :integer, :null => false
- t.column "fee", :decimal, :precision => 8, :scale => 2, :null => false
- t.column "period", :integer
- t.column "description", :string
- end
-
- create_table "gamegenres", :force => true do |t|
+ create_table "game_genres", :force => true do |t|
t.column "name", :string, :null => false
end
- create_table "gameplatforms", :force => true do |t|
+ create_table "game_platforms", :force => true do |t|
t.column "name", :string, :null => false
end
- create_table "medias", :force => true do |t|
- t.column "name", :string, :null => false
+ create_table "game_policies", :force => true do |t|
+ t.column "day", :integer, :null => false
+ t.column "fee", :decimal, :precision => 8, :scale => 2, :null => false
+ t.column "period", :integer
+ t.column "description", :string
end
create_table "merchandise_purchases", :force => true do |t|
end
create_table "rentables", :force => true do |t|
- t.column "type", :string
- t.column "title", :string
- t.column "newrelease", :boolean, :default => false
- t.column "video_genre", :integer
- t.column "director", :string
- t.column "media", :integer
- t.column "game_genre", :integer
- t.column "platform", :integer
+ t.column "type", :string
+ t.column "title", :string
+ t.column "newrelease", :boolean
+ t.column "video_genre_id", :integer
+ t.column "director", :string
+ t.column "video_media_id", :integer
+ t.column "game_genre_id", :integer
+ t.column "game_platform_id", :integer
end
# Could not dump table "sqlite_sequence" because of following StandardError
t.column "manager", :boolean, :default => false
end
+ create_table "video_genres", :force => true do |t|
+ t.column "name", :string, :null => false
+ end
+
+ create_table "video_medias", :force => true do |t|
+ t.column "name", :string, :null => false
+ end
+
create_table "video_policies", :force => true do |t|
t.column "day", :integer, :null => false
t.column "fee", :decimal, :precision => 8, :scale => 2, :null => false
t.column "description", :string
end
- create_table "videogenres", :force => true do |t|
- t.column "name", :string, :null => false
- end
-
end
require File.dirname(__FILE__) + '/../test_helper'
-require 'gamegenre_controller'
+require 'game_genre_controller'
# Re-raise errors caught by the controller.
-class GamegenreController; def rescue_action(e) raise e end; end
+class GameGenreController; def rescue_action(e) raise e end; end
-class GamegenreControllerTest < Test::Unit::TestCase
- fixtures :gamegenres
+class GameGenreControllerTest < Test::Unit::TestCase
+ fixtures :game_genres
def setup
- @controller = GamegenreController.new
+ @controller = GameGenreController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
- @first_id = gamegenres(:first).id
+ @first_id = game_genres(:first).id
end
def test_index
assert_response :success
assert_template 'list'
- assert_not_nil assigns(:gamegenres)
+ assert_not_nil assigns(:game_genres)
end
def test_show
assert_response :success
assert_template 'show'
- assert_not_nil assigns(:gamegenre)
- assert assigns(:gamegenre).valid?
+ assert_not_nil assigns(:game_genre)
+ assert assigns(:game_genre).valid?
end
def test_new
assert_response :success
assert_template 'new'
- assert_not_nil assigns(:gamegenre)
+ assert_not_nil assigns(:game_genre)
end
def test_create
- num_gamegenres = Gamegenre.count
+ num_game_genres = GameGenre.count
- post :create, :gamegenre => {}
+ post :create, :game_genre => {}
assert_response :redirect
assert_redirected_to :action => 'list'
- assert_equal num_gamegenres + 1, Gamegenre.count
+ assert_equal num_game_genres + 1, GameGenre.count
end
def test_edit
assert_response :success
assert_template 'edit'
- assert_not_nil assigns(:gamegenre)
- assert assigns(:gamegenre).valid?
+ assert_not_nil assigns(:game_genre)
+ assert assigns(:game_genre).valid?
end
def test_update
def test_destroy
assert_nothing_raised {
- Gamegenre.find(@first_id)
+ GameGenre.find(@first_id)
}
post :destroy, :id => @first_id
assert_redirected_to :action => 'list'
assert_raise(ActiveRecord::RecordNotFound) {
- Gamegenre.find(@first_id)
+ GameGenre.find(@first_id)
}
end
end
require File.dirname(__FILE__) + '/../test_helper'
-require 'gameplatform_controller'
+require 'game_platform_controller'
# Re-raise errors caught by the controller.
-class GameplatformController; def rescue_action(e) raise e end; end
+class GamePlatformController; def rescue_action(e) raise e end; end
-class GameplatformControllerTest < Test::Unit::TestCase
- fixtures :gameplatforms
+class GamePlatformControllerTest < Test::Unit::TestCase
+ fixtures :game_platforms
def setup
- @controller = GameplatformController.new
+ @controller = GamePlatformController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
- @first_id = gameplatforms(:first).id
+ @first_id = game_platforms(:first).id
end
def test_index
assert_response :success
assert_template 'list'
- assert_not_nil assigns(:gameplatforms)
+ assert_not_nil assigns(:game_platforms)
end
def test_show
assert_response :success
assert_template 'show'
- assert_not_nil assigns(:gameplatform)
- assert assigns(:gameplatform).valid?
+ assert_not_nil assigns(:game_platform)
+ assert assigns(:game_platform).valid?
end
def test_new
assert_response :success
assert_template 'new'
- assert_not_nil assigns(:gameplatform)
+ assert_not_nil assigns(:game_platform)
end
def test_create
- num_gameplatforms = Gameplatform.count
+ num_game_platforms = GamePlatform.count
- post :create, :gameplatform => {}
+ post :create, :game_platform => {}
assert_response :redirect
assert_redirected_to :action => 'list'
- assert_equal num_gameplatforms + 1, Gameplatform.count
+ assert_equal num_game_platforms + 1, GamePlatform.count
end
def test_edit
assert_response :success
assert_template 'edit'
- assert_not_nil assigns(:gameplatform)
- assert assigns(:gameplatform).valid?
+ assert_not_nil assigns(:game_platform)
+ assert assigns(:game_platform).valid?
end
def test_update
def test_destroy
assert_nothing_raised {
- Gameplatform.find(@first_id)
+ GamePlatform.find(@first_id)
}
post :destroy, :id => @first_id
assert_redirected_to :action => 'list'
assert_raise(ActiveRecord::RecordNotFound) {
- Gameplatform.find(@first_id)
+ GamePlatform.find(@first_id)
}
end
end
require File.dirname(__FILE__) + '/../test_helper'
-require 'videogenre_controller'
+require 'video_genre_controller'
# Re-raise errors caught by the controller.
-class VideogenreController; def rescue_action(e) raise e end; end
+class VideoGenreController; def rescue_action(e) raise e end; end
-class VideogenreControllerTest < Test::Unit::TestCase
- fixtures :videogenres
+class VideoGenreControllerTest < Test::Unit::TestCase
+ fixtures :video_genres
def setup
- @controller = VideogenreController.new
+ @controller = VideoGenreController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
- @first_id = videogenres(:first).id
+ @first_id = video_genres(:first).id
end
def test_index
assert_response :success
assert_template 'list'
- assert_not_nil assigns(:videogenres)
+ assert_not_nil assigns(:video_genres)
end
def test_show
assert_response :success
assert_template 'show'
- assert_not_nil assigns(:videogenre)
- assert assigns(:videogenre).valid?
+ assert_not_nil assigns(:video_genre)
+ assert assigns(:video_genre).valid?
end
def test_new
assert_response :success
assert_template 'new'
- assert_not_nil assigns(:videogenre)
+ assert_not_nil assigns(:video_genre)
end
def test_create
- num_videogenres = Videogenre.count
+ num_video_genres = VideoGenre.count
- post :create, :videogenre => {}
+ post :create, :video_genre => {}
assert_response :redirect
assert_redirected_to :action => 'list'
- assert_equal num_videogenres + 1, Videogenre.count
+ assert_equal num_video_genres + 1, VideoGenre.count
end
def test_edit
assert_response :success
assert_template 'edit'
- assert_not_nil assigns(:videogenre)
- assert assigns(:videogenre).valid?
+ assert_not_nil assigns(:video_genre)
+ assert assigns(:video_genre).valid?
end
def test_update
def test_destroy
assert_nothing_raised {
- Videogenre.find(@first_id)
+ VideoGenre.find(@first_id)
}
post :destroy, :id => @first_id
assert_redirected_to :action => 'list'
assert_raise(ActiveRecord::RecordNotFound) {
- Videogenre.find(@first_id)
+ VideoGenre.find(@first_id)
}
end
end
require File.dirname(__FILE__) + '/../test_helper'
-require 'media_controller'
+require 'video_media_controller'
# Re-raise errors caught by the controller.
-class MediaController; def rescue_action(e) raise e end; end
+class VideoMediaController; def rescue_action(e) raise e end; end
-class MediaControllerTest < Test::Unit::TestCase
- fixtures :medias
+class VideoMediaControllerTest < Test::Unit::TestCase
+ fixtures :video_medias
def setup
- @controller = MediaController.new
+ @controller = VideoMediaController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
- @first_id = medias(:first).id
+ @first_id = video_medias(:first).id
end
def test_index
assert_response :success
assert_template 'list'
- assert_not_nil assigns(:medias)
+ assert_not_nil assigns(:video_medias)
end
def test_show
assert_response :success
assert_template 'show'
- assert_not_nil assigns(:media)
- assert assigns(:media).valid?
+ assert_not_nil assigns(:video_media)
+ assert assigns(:video_media).valid?
end
def test_new
assert_response :success
assert_template 'new'
- assert_not_nil assigns(:media)
+ assert_not_nil assigns(:video_media)
end
def test_create
- num_medias = Media.count
+ num_video_medias = VideoMedia.count
- post :create, :media => {}
+ post :create, :video_media => {}
assert_response :redirect
assert_redirected_to :action => 'list'
- assert_equal num_medias + 1, Media.count
+ assert_equal num_video_medias + 1, VideoMedia.count
end
def test_edit
assert_response :success
assert_template 'edit'
- assert_not_nil assigns(:media)
- assert assigns(:media).valid?
+ assert_not_nil assigns(:video_media)
+ assert assigns(:video_media).valid?
end
def test_update
def test_destroy
assert_nothing_raised {
- Media.find(@first_id)
+ VideoMedia.find(@first_id)
}
post :destroy, :id => @first_id
assert_redirected_to :action => 'list'
assert_raise(ActiveRecord::RecordNotFound) {
- Media.find(@first_id)
+ VideoMedia.find(@first_id)
}
end
end
require File.dirname(__FILE__) + '/../test_helper'
-class GamegenreTest < Test::Unit::TestCase
- fixtures :gamegenres
+class GameGenreTest < Test::Unit::TestCase
+ fixtures :game_genres
# Replace this with your real tests.
def test_truth
require File.dirname(__FILE__) + '/../test_helper'
-class GameplatformTest < Test::Unit::TestCase
- fixtures :gameplatforms
+class GamePlatformTest < Test::Unit::TestCase
+ fixtures :game_platforms
# Replace this with your real tests.
def test_truth
require File.dirname(__FILE__) + '/../test_helper'
-class MediaTest < Test::Unit::TestCase
- fixtures :medias
+class VideoGenreTest < Test::Unit::TestCase
+ fixtures :video_genres
# Replace this with your real tests.
def test_truth
require File.dirname(__FILE__) + '/../test_helper'
-class VideogenreTest < Test::Unit::TestCase
- fixtures :videogenres
+class VideoMediaTest < Test::Unit::TestCase
+ fixtures :video_medias
# Replace this with your real tests.
def test_truth