I am coding a web application in ruby on rails. I have a set of text boxes in each one there is a character and i want to glue all these text boxes in order to make one word. Th开发者_运维问答e text boxes are like this :
1 %>any ideas ??
Well for starters dont use a for loop, they ugly.
Second I wouldn't use the text_field helper rather the text_field tag
<% (1..10).each do |n| %>
<%= text_field_tag "password[#{n}]" %>
<% end %>
That will return the password all nicely chunked up
精彩评论