O'Reilly logo

Rails, Angular, Postgres, and Bootstrap, 2nd Edition by David B. Copeland

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Next: Using Postgres to Make Our Login More Secure

Devise cannot absolutely prevent users from being added into our database that do not meet our security criteria. For example, Active Record provides the method update_attribute, which skips validations and could be used to insert a user with any email address into the USERS table. What we need is for the data layer itself to enforce our requirements. Postgres’s check constraints can do this.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required