Project (id)
Permission (project_id, user_id)
When trying to save a project, I get the following error: ActiveRecord::RecordNotSaved (You cannot call create unless the parent is saved):
Controller:
@project = current_user.projects.new(:name => params[:project][:name])
@project.permissions.build(:user_id => current_user.id)
respond_to do |format|
if @project.save
......
Suggestions? Thansk