Last active
August 29, 2015 14:04
-
-
Save KattyaCuevas/6ef254700b8ecb30b50d to your computer and use it in GitHub Desktop.
Forms en Rails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= form_tag do %> | |
<!-- <label for="nombre">Nombre:</label> --> | |
<%= label_tag(:nombre, "Nombre:") %> | |
<!-- <input id="nombre" name="nombre" type="text"> --> | |
<%= text_field_tag(:nombre) %> | |
<br /> | |
<%= label_tag(:descripcion, "Descripcion General") %> | |
<!-- <input id="nombre" name="nombre" type="text"> --> | |
<%= hidden_field_tag(:descripcion, "Es un producto") %> | |
<br /> | |
<!-- <select id="precio" name="precio"> | |
<option value="1">50.00</option> | |
<option selected="selected" value="2">100.00</option> | |
</select> --> | |
<%= select_tag(:precio, options_for_select([ | |
['50.00',1], | |
['100.00',2], | |
], 2)) %> | |
<br /> | |
<!-- <input name="commit" type="submit" value="Crear"> --> | |
<%= submit_tag("Crear") %> | |
<% end %> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment