Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%= form_for(@product) do |f| %>
- <% if @product.errors.any? %>
- <div id="error_explanation">
- <h2><%= pluralize(@product.errors.count, "error") %> prohibited this product from being saved:</h2>
- <ul>
- <% @product.errors.full_messages.each do |message| %>
- <li><%= message %></li>
- <% end %>
- </ul>
- </div>
- <% end %>
- <div class="field">
- <%= f.label :name %><br>
- <%= f.text_field :name %>
- </div>
- <div class="field">
- <%= f.label :test %><br>
- <%= f.text_field :test %>
- </div>
- cach 1 xet theo radio
- <div>
- <td class="center">
- <% [*1..1].each do | i| %>
- <% [*1..4].each do |j| %>
- <%= f.radio_button "fix_#{i}".to_sym, j %> 特集 <%= j %>
- <% end %>
- <% end %>
- </td>
- </div>
- cach 2 xet theo check bok
- <div>
- <td class="center">
- <% [*1..1].each do | i| %>
- <% [*1..4].each do |j| %>
- <%= f.check_box "fix_#{i}".to_sym, j %> 特集 <%= j %>
- <% end %>
- <% end %>
- </td>
- </div>
- <div class="actions">
- <%= f.submit %>
- </div>
- <% end %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement