FAQ: Saving Data - Model

This community-built FAQ covers the “Model” exercise from the lesson “Saving Data”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Learn Ruby on Rails

FAQs on the exercise Model

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

I’m on step 2 and can’t find the file in the editor to open it. The bash console shows that it exists, but I can’t see it.

How did u solve?
regards 2020202

I don’t think I ever really got it working. I was kind of able to work around the issue by restarting the lesson from the step I was on, but i had similar issues with the entire rails path.

The other workaround ontemember eas tonhave it show the solution, and try to review, but it’s hard to learn much that way.

1 Like

why is a database called a “model”? it’s confusing. why not just call it… um, let’s see… a hah!! call it a “DATABASE” !?

if you look at the response from the console, it says you can create the Messages model by adding “–force” onto the end of your command. That’s how I got it to work for me!

i read through the rails documentation on creating models, whats mising in the instructions is that you need to create a title and body in the gnerate model command:

rails generate model Message title:string body:text