Created
September 26, 2014 10:49
-
-
Save mitnick78/1ea36800ae373662a498 to your computer and use it in GitHub Desktop.
erreur : param is missing or the value is empty: project_member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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