Last active
June 15, 2016 19:43
-
-
Save crova/481e4c662959d31ee34f5b4a79fc9252 to your computer and use it in GitHub Desktop.
How to populate select list with data from a specific model?
This file contains hidden or 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
| <tr> | |
| <th><%= f.label(:deal) %></th> | |
| <td><%= f.select(:deal, options_for_select([['CPL', 'CPL'], ['CPC', 'CPC'], ['CPM', 'CPM'], ['CTL', 'CTL'], ['CPA', 'CPA']]), :value => @single_shoot.deal) %></td> | |
| </tr> |
This file contains hidden or 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
| create_table "deals", force: :cascade do |t| | |
| t.string "deal" | |
| t.datetime "created_at", null: false | |
| t.datetime "updated_at", null: false | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment