Redirect to edit path using drop down and Jquery in rails
问题 I have a select drop down of items. When the user selects and item I need to redirect to edit_item_path for the item_id. e.g. If user selects and item with id =5 I need to redirect to items/5/edit path How to do this in rails 3 and jquery? 回答1: Lets say that your dropdown looks like this: <select id="editable_pages"> <option value="1">Edit 1</option> <option value="2">Edit 2</option> </select> in that case following jquery snippet should works: $('#editable_pages').change(function() { window