Rails 3.2.0 | Ruby 1.9.2
Route:
xyz_catalog_device_info
GET|POST /xyz/catalog/devices/:device_id/info(.:format)
xyz/catalog/devices#info`
My app wraps up several API services into one system to provide a single place to maintain SSL Certificates and complicated XML generation logic. My controller makes an HTTP call to a 3rd party API to obtain the information, so there's no XYZ::Catalog::Device persisting (no @device) to implement the usual rails form helper tricks.
I want to create a form like the following:
%form{ :action => xyz_catalog_device_info_path(:format => :xml) }
= label_tag :device_id, "Device ID:"
= text_field_tag :device_id
= submit_tag "Search"
so that it will fill in the device_id in the action.
Is this possible without using javascript? Is there a better way of doing this?