kris
2006-Mar-28 13:17 UTC
[Rails] Passing the input name to "text_field_with_auto_complete"
I have a view with two auto complete input boxes. How do I give the input a name like I can for "text_input" helper? I''ve looked at the docs (http://api.rubyonrails.com/classes/ActionView/Helpers/JavaScriptMacrosHelper.html#M000462) but cant make sense of it... <p><label for="search_start_station">From</label><br/> <%= text_field_with_auto_complete :station, :name %></p> <p><label for="search_end_station">To</label><br/> <%= text_field_with_auto_complete :station, :name %></p> At the moment both inputs have the same name: <input id="station_name" name="station[name]" size="30" type="text" /> <input id="station_name" name="station[name]" size="30" type="text" /> Many thanks, K. -- Posted via http://www.ruby-forum.com/.