Rails - return an array of months for a select tag

前端 未结 10 2523
谎友^
谎友^ 2021-02-07 10:02

I\'m in an app that is on Rails 2.3.8, and need to return an array of month names and numbers to be plugged into an options_for_select statement. What I\'ve got so far is kind

10条回答
  •  一向
    一向 (楼主)
    2021-02-07 10:28

    Working for ROR 4

    select_month(0 , prompt: 'Choose month')
    

提交回复
热议问题