Advertisement
Guest User

Untitled

a guest
May 29th, 2015
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. <%= form_for(@product) do |f| %>
  2. <% if @product.errors.any? %>
  3. <div id="error_explanation">
  4. <h2><%= pluralize(@product.errors.count, "error") %> prohibited this product from being saved:</h2>
  5.  
  6. <ul>
  7. <% @product.errors.full_messages.each do |message| %>
  8. <li><%= message %></li>
  9. <% end %>
  10. </ul>
  11. </div>
  12. <% end %>
  13.  
  14. <div class="field">
  15. <%= f.label :name %><br>
  16. <%= f.text_field :name %>
  17. </div>
  18. <div class="field">
  19. <%= f.label :test %><br>
  20. <%= f.text_field :test %>
  21. </div>
  22. cach 1 xet theo radio
  23. <div>
  24. <td class="center">
  25. <% [*1..1].each do | i| %>
  26. <% [*1..4].each do |j| %>
  27. <%= f.radio_button "fix_#{i}".to_sym, j %> 特集 <%= j %>
  28. <% end %>
  29. <% end %>
  30. </td>
  31. </div>
  32. cach 2 xet theo check bok
  33. <div>
  34. <td class="center">
  35. <% [*1..1].each do | i| %>
  36. <% [*1..4].each do |j| %>
  37. <%= f.check_box "fix_#{i}".to_sym, j %> 特集 <%= j %>
  38. <% end %>
  39. <% end %>
  40. </td>
  41. </div>
  42. <div class="actions">
  43. <%= f.submit %>
  44. </div>
  45. <% end %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement