How to wrap every select of date_select with a div in Rails?

后端 未结 5 1898
抹茶落季
抹茶落季 2020-12-19 01:08

I\'m using Ruby on Rails 3 to create a form for the user, where he can save his birthdate. All the actions around the controller and model work just fine. But I\'m having tr

5条回答
  •  暖寄归人
    2020-12-19 01:43

    I am using a solution involving the parameter :date_separator. Something along the lines of this:

    .select-wrapper
      = f.date_select :birthday, :start_year => Time.now.year - 120, :end_year => Time.now.year, :date_separator => '
    '

提交回复
热议问题