Hello, i want to know if i am relationing fine, because i am having
problems,i have 2 models, one for members and other to relate some
members to this:
class Member < ActiveRecord::Base
has_many :matrix, :foreign_key=>:parent
class Matrix < ActiveRecord::Base
belongs_to :member, :foreign_key=>:userid
when i try to save a new member it says: undefined method `userid=’ for
Matrix:Class and i think is because he wants to do find() first, but i
dont want it, because i am saving a new.
@member = Member.new(params[:member])
@member.matrix.userid = @member.userid
@member.matrix.parent = params[:parent]
is a relationating problem??