I’m using Restful Authentication (which I hope some of you know), so I’m
using that Users-table as my main table.
Now, I’ve added a table called ‘Presentations’.
I’ve also added a presentation_id in my Users-table so the right user’s
presentation can be found. In my User-model I’ve got a “belongs_to
:presentation” and in my Presentation-model “belongs_to :user”.
As long as I create/assign everything MANUALLY in the tables it works
fine. Now, that’s kind of dull to do for every new user signing in
(especially since the presentation page will render a “nil-crash” if I
haven’t assigned the user a Presentation with som text before he/she
I know that I need to do a create function somewhere, but I’m unsure
where to put it, though I’m guessing in the UserController’s create. I
want it to create a default text once (upon creation of the new user) so
the user later on can edit his/her presentation (a feature I’ve allready
my question: Where do I create this “create” function (to work with
Restful Authentication)and any suggestions on how should it look/work?