class GamePolicyController < ApplicationController
+ layout "admin"
# Make sure that the user has logged in before they can take any action
before_filter :authorize, :only => [:index, :list, :show]
render :action => 'maintenence'
end
+ def limits
+ render :action => 'limits'
+ end
+
def add_user
@user = User.new(params[:user])
if request.post? and @user.save
class RentablePolicyController < ApplicationController
+ layout "admin"
# Make sure that a user logs in before doing any action here
before_filter :authorize, :only => [:index, :list, :show]
class VideoPolicyController < ApplicationController
+ layout "admin"
# Make sure that a user logs in before doing any action here
before_filter :authorize, :only => [:index, :list, :show]
-<h1>Listing game_policies</h1>
+<h1>Game Rental Policies</h1>
-<table>
+<table border="1">
<tr>
<% for column in GamePolicy.content_columns %>
<th><%= column.human_name %></th>
<% for column in GamePolicy.content_columns %>
<td><%=h game_policy.send(column.name) %></td>
<% end %>
- <td><%= link_to 'Show', :action => 'show', :id => game_policy %></td>
+ <td><%= link_to 'View', :action => 'show', :id => game_policy %></td>
<td><%= link_to 'Edit', :action => 'edit', :id => game_policy %></td>
- <td><%= link_to 'Destroy', { :action => 'destroy', :id => game_policy }, :confirm => 'Are you sure?', :method => :post %></td>
</tr>
<% end %>
</table>
<p><%= link_to "Customer Maintenence", :controller => 'customer', :action => 'index' %></p>
<p><%= link_to "Financial Information", :controller => 'purchase', :action => 'index' %></p>
<p><%= link_to "System Maintenence", :controller => 'login', :action => 'maintenence' %></p>
+ <p><%= link_to "Rental Policies and Limits", :controller => 'login', :action => 'limits' %></p>
<br/>
<p><%= link_to "Logout", :controller => 'login', :action => 'logout' %></p>
</div>
--- /dev/null
+<h1>Rental Limits and Pricing</h1>
+
+<h3>Actions</h3>
+<ul>
+ <li><%= link_to 'Game Rental Pricing', :controller => 'game_policy', :action => 'index' %></li>
+ <li><%= link_to 'Video Rental Pricing', :controller => 'video_policy', :action => 'index' %></li>
+ <li><%= link_to 'Rental Limits', :controller => 'rentable_policy', :action => 'index' %></li>
+</ul>
+
-<h1>Listing rentable_policies</h1>
+<h1>Rental Policies</h1>
-<table>
+<table border="1">
<tr>
<% for column in RentablePolicy.content_columns %>
<th><%= column.human_name %></th>
<% for column in RentablePolicy.content_columns %>
<td><%=h rentable_policy.send(column.name) %></td>
<% end %>
- <td><%= link_to 'Show', :action => 'show', :id => rentable_policy %></td>
+ <td><%= link_to 'View', :action => 'show', :id => rentable_policy %></td>
<td><%= link_to 'Edit', :action => 'edit', :id => rentable_policy %></td>
- <td><%= link_to 'Destroy', { :action => 'destroy', :id => rentable_policy }, :confirm => 'Are you sure?', :method => :post %></td>
</tr>
<% end %>
</table>
-<h1>Listing video_policies</h1>
+<h1>Video Rental Policies</h1>
-<table>
+<table border="1">
<tr>
<% for column in VideoPolicy.content_columns %>
<th><%= column.human_name %></th>
<% for column in VideoPolicy.content_columns %>
<td><%=h video_policy.send(column.name) %></td>
<% end %>
- <td><%= link_to 'Show', :action => 'show', :id => video_policy %></td>
+ <td><%= link_to 'View', :action => 'show', :id => video_policy %></td>
<td><%= link_to 'Edit', :action => 'edit', :id => video_policy %></td>
- <td><%= link_to 'Destroy', { :action => 'destroy', :id => video_policy }, :confirm => 'Are you sure?', :method => :post %></td>
</tr>
<% end %>
</table>