As an Oracle ADF developer I am familiar with being able to create an Entity (the rails equivalent would be a Model) that includes all of the DB constraints (PK, FK, unique, length, any non-trigger induced constraint). As a result, in ADF I can very easily create a field on the view that is based on an Entities attribute.
For the sake of example, I place 3 such fields, one is a String (or VARCHAR2 in Oracle...) with a max length of 20, and the other is an INT and a DATE. The metadata (type, length constraints) are stored in the Model. And by default, any field generated with automatically include this validation on the front end. So, the first field, the String(20)
will be a text input field with a max length of 20. So, question 1, will rails do this automatically on the front end or must I go and set this? Now, in ADF the int field that is placed on the view will not allow the user to enter non-digits (this will trigger on an attempt to update the Model (hitting submit, going to a new page). So, question 2, does rails automatically prevent non-digits? Also does rails have re-usable validation for simple things like phone numbers, addresses. Lastly, question 3, by default in ADF, any date will automatically generate a typical calendar widget for input. Does this also occur for rails? What does rails use for these kinds of javascript widgets if this isn't the case?