Added generated RESTful RatesController. #1916
This commit is contained in:
1 parent
8eeb0f4872
commit
441a86e7a6
8 files changed
+422
No files matched your search
@@ -0,0 +1,28 @@
|
||||
<h1>Editing rate</h1>
|
||||
|
||||
<% form_for(@rate) do |f| %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<p>
|
||||
<%= f.label :amount %><br />
|
||||
<%= f.text_field :amount %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :user_id %><br />
|
||||
<%= f.text_field :user_id %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :project_id %><br />
|
||||
<%= f.text_field :project_id %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :date_in_effect %><br />
|
||||
<%= f.date_select :date_in_effect %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.submit "Update" %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= link_to 'Show', @rate %> |
|
||||
<%= link_to 'Back', rates_path %>
|
||||
@@ -0,0 +1,26 @@
|
||||
<h1>Listing rates</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Amount</th>
|
||||
<th>User</th>
|
||||
<th>Project</th>
|
||||
<th>Date in effect</th>
|
||||
</tr>
|
||||
|
||||
<% for rate in @rates %>
|
||||
<tr>
|
||||
<td><%=h rate.amount %></td>
|
||||
<td><%=h rate.user_id %></td>
|
||||
<td><%=h rate.project_id %></td>
|
||||
<td><%=h rate.date_in_effect %></td>
|
||||
<td><%= link_to 'Show', rate %></td>
|
||||
<td><%= link_to 'Edit', edit_rate_path(rate) %></td>
|
||||
<td><%= link_to 'Destroy', rate, :confirm => 'Are you sure?', :method => :delete %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to 'New rate', new_rate_path %>
|
||||
@@ -0,0 +1,27 @@
|
||||
<h1>New rate</h1>
|
||||
|
||||
<% form_for(@rate) do |f| %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<p>
|
||||
<%= f.label :amount %><br />
|
||||
<%= f.text_field :amount %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :user_id %><br />
|
||||
<%= f.text_field :user_id %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :project_id %><br />
|
||||
<%= f.text_field :project_id %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :date_in_effect %><br />
|
||||
<%= f.date_select :date_in_effect %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.submit "Create" %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= link_to 'Back', rates_path %>
|
||||
@@ -0,0 +1,23 @@
|
||||
<p>
|
||||
<b>Amount:</b>
|
||||
<%=h @rate.amount %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>User:</b>
|
||||
<%=h @rate.user_id %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Project:</b>
|
||||
<%=h @rate.project_id %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Date in effect:</b>
|
||||
<%=h @rate.date_in_effect %>
|
||||
</p>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_rate_path(@rate) %> |
|
||||
<%= link_to 'Back', rates_path %>
|
||||
Reference in new issue
Block a user