paint-brush
How To Use Rails Console To Test Rails Models, Associations and Validationsby@elukoye
9,945 reads
9,945 reads

How To Use Rails Console To Test Rails Models, Associations and Validations

by Elukoye7mJune 11th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow
EN

Too Long; Didn't Read

Using the rails console is an irb session that is built into the rails environment and is accessed by typing rails c into the terminal. It can be used to test association methods, validations and check error messages when building a rails app. A good tool to use is LUCID to help developers design their apps for their apps. We are going to build a blog with two models, a user with a name attribute and an article with a title attribute and a body attribute. Let’s build a sample blog app to see how it works.

Company Mentioned

Mention Thumbnail
featured image - How To Use Rails Console To Test Rails Models, Associations and Validations
Elukoye HackerNoon profile picture
Elukoye

Elukoye

@elukoye

Using tech to bring my creative imagination into physical reality.

About @elukoye
LEARN MORE ABOUT @ELUKOYE'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Elukoye HackerNoon profile picture
Elukoye@elukoye
Using tech to bring my creative imagination into physical reality.

TOPICS

Languages

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite