This needed to be generated into Models using Rails.
Using the text editor, I controlled what each one of the Models did. To the right is the "User" model. Which says you need a valid email, first name, and last name. That is what the :presence => "true" is for.
Here is some of that code (<--) on the command line. This is the Message model with 5 different entries in it. Each Message belongs to a post_id and user_id. Those corresponding Id's have many messages. An author and message is required for these to work. The created_at and updated_at are automatically updated by SQlite. Must be nice, right?
- Kyle
No comments:
Post a Comment