I have 3 models
Skill, User, UserSkill

User has_many skills :through => :user_skills
User has_many :user_skills

UserSkill.new # => { :id => nil, :user_id => nil, :skill_id => nil }
us = UserSkill.create(:user_id => 1, :skill_id => 1) # => { :id => nil,
:user_id => 1, :skill_id => 1 }

Why id is nil?
In the database record was created and id is not null...

-- 
Posted via http://www.ruby-forum.com/.

-- 
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