When using the form_for helper and a text_field call, Ruby on Rails will generate a unique id for the element that it outp
form_for
text_field
Look at the form builder options:
<%= form_for @user do |f| %> <% form_css_id = "#" + f.options[:html][:id] %> <% end %>
Options should at least include the following data: css class, id, http method and authenticity token.