Last active
June 30, 2017 02:42
-
-
Save maecha/b113298cf7816d7af618260b332917c7 to your computer and use it in GitHub Desktop.
HASHから簡易選択 select, select_tag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= f.select :hoge_type, options_for_select(Hoge::TYPE_HASH.invert), { include_blank: '選択してください' }, { class: 'test', required: true } %> | |
<%= select_tag :hoge_type, options_from_collection_for_select(Hoge::TYPE_HASH.invert, :first, :last), { :include_blank => '選択してください' } %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment