Just calling a build on collection will not actually save the record. You need to save it before using id attribute.
after executing,
@team = Team.new(params[:team])
or
@department = @team.departments.build(:organization_id => User.current.organization_id, :team_id => @team.id)
@team.id or @department.id will give you the nil value.
As well
@team.users.build(:email => @department.id).save(:validate => false)
will return Boolean value i.e. true or false.
After building you should save this values explicit if you want, like
@team = Team.new(params[:team])
@team.save
and
@pool_user = @team.users.build(:email => @department.id)
@pool_user.save(:validate => false)
should work.
I suggest you to try this all in rails console before actually writing any code.