Topic: TODO Task Project Planning

Hi, Ive finished Learning Rails 3 by O'Really, and now its time to experiment knowledge on a real project and I'll be deploying to Red Hat's OpenShift platform.
Searching trough my laptop code projects folder, I came out with a simple TODO task manager ive wrote once in C++. So it would be a good idea to bring that project back to life, this time as a web task managing service in rails, allowing auth with OmniAuth.

The original C++ project was planned on a OOP point of view. You could create a "Task" object with its current ID number, Text string, Date ,and Time.
Every part of a task was made as a different C++ class. Eash one cointains its validation on the constructor.
And then saved the tasks to sqlite or exporting them as a plain text that you could share or read again on the app.

So, back to business, im trying to adapt that little app into something more complex in Rails using MVC.

I tought about adding a Scaffolding that brings the form to fill the task's text field and pass it to the Controller.
The controller will set current date and time, and ID is setted by default when saving to the DB.
Validations should go on the model, and I'll create a migration to build a table upon that fields.
As I'll be adding multiuser support with OmniAuth, (so every user could save his own tasks), I should create a new DB table, with users info.

But should I create a new task table for each user, and then mapping them to the users table?
Or just create one task table and drop every user's tasks in there and then mapping all there?

I cant figure out a good with saving user tasks to the db.

Any ideas?

Thanks in advance

Re: TODO Task Project Planning

Not sure what you mean by

But should I create a new task table for each user, and then mapping them to the users table?

You should have a user tble and a task table, you map your relationships in ActiveRecord by setting the User modl to have many tasks and the task model to belong_to user

You might find this railscast usefull
http://railscasts.com/episodes/196-nest … orm-part-1

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)