On 4 April 2011 09:46, HelloRails <[email protected]> wrote:

Please don't top post, it makes it difficult to follow the thread.
Insert your reply at appropriate points in previous message.  Thanks.

> And my email model has_many: tokens ?, right?

I don't know, that is for you to say.
If an email has many tokens then token belongs to email and you need
an email_id in tokens table.  You do not appear to be setting that
when you create each token.

>
> Okei, i added belongs_to .. in my answer model.
>
> I mean doesn't work.. questions is added successfully, but in token
> models i dont have any tokens (I should have about 10).

Have you got any validations in Token that would prevent them being saved?
When you used ruby-debug to break in before the create does the code
get there ok?

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to