Handling mash creation, removing some unnecessary controller methods, redirecting some others to :action => 'new'.
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
<h1>New mash</h1>
|
||||
<h1>Mash the Maps!</h1>
|
||||
<p>Choose your fave.</p>
|
||||
|
||||
<% form_for(@mash) do |f| %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<div id="map_a" class="mash-image">
|
||||
<%= f.label 'A' %><br />
|
||||
<%= f.hidden_field :map_a, :value => @map_a.id %>
|
||||
<image src="<%= url_for @map_a %>.png" />
|
||||
</div>
|
||||
<div id="map_b" class="mash-image">
|
||||
<%= f.label 'B' %><br />
|
||||
<%= f.hidden_field :map_b, :value => @map_b.id %>
|
||||
<image src="<%= url_for @map_b %>.png" />
|
||||
</div>
|
||||
<p>
|
||||
<div id="map_a">
|
||||
<%= f.label :map_a %><br />
|
||||
<image src="<%= url_for @map_a %>.png" />
|
||||
</div>
|
||||
<div id="map_b">
|
||||
<%= f.label :map_b %><br />
|
||||
<image src="<%= url_for @map_b %>.png" />
|
||||
</div>
|
||||
<%= f.select :winner, [['A', @map_a.id], ['B', @map_b.id]] %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :winner %><br />
|
||||
<%= f.text_field :winner %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.submit 'Create' %>
|
||||
<%= f.submit 'Mash' %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
|
Reference in New Issue
Block a user