奇数の列にだけselectedを付加する場合
%select
- 1..10.each do |element|
%option{:value=>element, :selected => element.odd?}
#{element}番目の値
Go to list of users who liked
More than 5 years have passed since last update.
奇数の列にだけselectedを付加する場合
%select
- 1..10.each do |element|
%option{:value=>element, :selected => element.odd?}
#{element}番目の値
Register as a new user and use Qiita more conveniently
Go to list of users who liked