Ruby-on-Rails

testing the waters with rails

I’m going to start this with reiterating again that I do not know anything about rails. I started this blog to document my progress in such a way that it might be of some kind of use to someone else. But probably mostly myself. I’m currently using a combination of tutsplus and the rails website to learn rails and how all the pieces integrate.

I’m going to try to build a simple blog to start off with. I know most tutorials start off with some lame ass to-do app or something but I’m overly ambitious and probably too stupid to just start with that.

what i’m going to start off with is figuring out what kind of data structure I want in each of my pages

 

I want a model for posts, comments, users, passwords, tags, roles, tag-index, role-index

post:

 post_id(int), title(string), body (text), timestamp, published(bool), user_id(ref users model)

comment:

comment_id(int), body (text), timestamp, user_id(ref user model), post_id(ref post model)

user:

user_id(int), firstname(string), lastname(string), email(string), username(string)

password:

user_id(ref users model), password(string)

role:

role_id(int), rolename(string), (need to add more columns for each permission we want it to have)

role-index:

role_id(ref role model), user_id(ref user model)

tag:

tag_id(int), tagname(string)

tag-index:

post_id(ref post model), tag_id(ref tag model)

 

now that I have that 90% done, I’ve started thinking about in what order I want to make these.

I’ve decided that starting off with user, role, tag are the best ones to start with since all of the other models depend on them.

Then I can add post, comment, role-index, tag-index, and password.

I’ll post how I did that as soon as I figure out how.