http://github.com/samliu/rlinkset
^^ My code so far is pushed to there.
Essentially, I'm using resource_controller and I don't really understand resource_controller. When I used scaffolding to create my Post model, I gave it fields like
:integer parent #to say what level a post is at (which post ID is this post's parent)
:integer user_id #I meant for this to hold something like @user.id
Now, the scaffold form created lets me put in those values. however, I want them to be put in automatically from the controller and not to be something the user submits. Like, in the backend logic, I need to set @post.user_id = @user.id or something like that.
However, since resource_controller hides all the methods like create, index, new, edit, destroy, whatever, I can't find where to edit the function I need.
I'm very new at TDD and RESTful design. I worked did some basic rails/ruby stuff in the past but haven't touched it for a while until now.
Would appreciate some guidance! :)