[LRUG] Form objects is Ruby

Michael Pavling pavling at gmail.com
Fri Jul 24 04:17:00 PDT 2015


On 24 Jul 2015 11:20, "Kasper Grubbe" <kawsper at gmail.com> wrote:
>
> One of the purest forms of this that I have found is the
"Password-change" use case. Because it deals with virtual fields as well.
So lets say you have a User-model, and that model have a password-field
that needs to be changed.
>
> The database would look like this:
>
> User
>   id
>   username
>   password
>
> But what the user most often is presented with is these fields:
>
> Current password
> New password
> New password confirmation
>
> So you have a case where the interface doesn't match the structure of
your database.

Hopefully the database has "password_hash" or similar, rather than
"password" ;-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20150724/97e21bfd/attachment-0003.html>


More information about the Chat mailing list