LoginSignup
0
0

More than 1 year has passed since last update.

f.select の引数

Last updated at Posted at 2022-02-02

まとめ

test.html.erb
<%= f.select :sort, {'点数が高い順': 'score_desc', '点数が低い順': 'score_asc'}, {selected: @search_params[:sort], include_blank: '選択して下さい'}, {class: 'class_name'} %>

第1引数

:sort

第2引数

{'点数が高い順': 'score_desc', '点数が低い順': 'score_asc'}

第3引数

{selected: @search_params[:sort], include_blank: '選択して下さい'}

第4引数

{class: 'class_name'}

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0