Skip to content

Instantly share code, notes, and snippets.

@mitnick78
Created September 26, 2014 10:49
Show Gist options
  • Save mitnick78/1ea36800ae373662a498 to your computer and use it in GitHub Desktop.
Save mitnick78/1ea36800ae373662a498 to your computer and use it in GitHub Desktop.
erreur : param is missing or the value is empty: project_member
def new_team
@team = ProjectMember.new(team_params)
if @team.save
render json: {
status: "ok",
id: id,
lastname: lastname,
firstname: firstname,
role: role,
bio: bio,
}
else
render json: {
status: "erreur",
}
end
end
private
def team_params
params.require(:project_member).permit(:firstname, :lastname, :role, :bio, :project)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment