Monday, March 27, 2017

RAILS Save Form Fields Upcasing them

We can uppercase the forms with several ways but at the time to save the data by default, the form will send the info lower case so upcase the view does not solve the problem we need to work on the controller, or model here it the simple way to do it on model.

First we add the css transformation to upcase the field via class:

Now that we have to put the class in the Field's Form

now that we have the form uppercase the text input its time to work on the model

and that is all, for a better comprension of the upcase! or better understanding on the model part check out statck overflow and ruby guides

No comments:

Post a Comment