0
私はオプションの値をサブミット後に保存したいが、これはコードの一部(スリム)だが、私もrubyonのレールを使うことができる。誰かがどんな考えを持ってください 選択項目であるreference-ワン系列カラー - モデル - ジェンダーext_product_idruby on rails選択肢の値を扱う方法
well.search-form
form
input type="hidden" value="put" name="_method"
- if search.scope == :my_items
input type="hidden" value="#{search_params.published}" name="published"
input type="hidden" value="#{search_params.query}" name="query"
fieldset
.row-fluid
.span8
label for="query" =translate"keyword"
select#query.selectoption name="keywordSearch"
option[value="reference" name="reference" selected=("selected" if @_source=="reference")] Reference
option[value="brand" name="brand" selected=("selected" if @_source=="brand")] Brand
option[value="model" name="model" selected=("selected" if @_source=="model")] Model
option[value="color" name="color" selected=("selected" if @_source=="color")] Color
option[value="ext_product_id" name="ext_product_id" selected=("selected" if @_source=="ext_product_id")] Productid
option[value="gender" name="gender" selected=("selected" if @_source=="gender")] Gender
railsタグヘルパーを使用 –
どうすれば使用できますか? –
http://apidock.com/rails/ActionView/Helpers/FormTagHelper/select_tagを参照してください。 –