Skip to main content
100%

Reform multiparameter date issue

✓ Published0🌍 Public
Aafbroman
Last edited Jul 14, 2015
Created on Jul 14, 2015

A Rails form demonstrates how Reform’s `multi_params: true` option on a `birthdate` property automatically splits a single date input into separate year, month, and day parameters for validation. The `new.html.erb` template uses SimpleForm’s `f.input :birthdate, as: :date` to render the date fields, while `UserForm` declares the typed `Date` property. The `UsersController` instantiates the form with a `User` model, validates submitted params, and saves on success, showing the seamless handoff between HTML form, Reform validation, and ActiveRecord persistence.

AI-generated description

Similar vizzes